Robustify profile image controls ever so slightly
Summary: show project profile image on pertinent edit page. also add a "Use Default Image" checkbox for both project and user profiles. Also added a function for projects to get the profile picture to prevent some copy + paste action. Test Plan: set my user profile and project profile image. clicked "Use Default Image" and got the default image back. Reviewers: epriestley, floatinglomas Reviewed By: floatinglomas CC: aran, Korvin Maniphest Tasks: T1307 Differential Revision: https://secure.phabricator.com/D2852
This commit is contained in:
@@ -40,17 +40,7 @@ final class PhabricatorProjectProfileController
|
||||
$profile = new PhabricatorProjectProfile();
|
||||
}
|
||||
|
||||
$src_phid = $profile->getProfileImagePHID();
|
||||
if (!$src_phid) {
|
||||
$src_phid = $user->getProfileImagePHID();
|
||||
}
|
||||
$file = id(new PhabricatorFile())->loadOneWhere('phid = %s',
|
||||
$src_phid);
|
||||
if ($file) {
|
||||
$picture = $file->getBestURI();
|
||||
} else {
|
||||
$picture = PhabricatorUser::getDefaultProfileImageURI();
|
||||
}
|
||||
$picture = $profile->loadProfileImageURI();
|
||||
|
||||
$members = mpull($project->loadAffiliations(), null, 'getUserPHID');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user