Remove PhabricatorProject->loadProfile

Summary: Ref T603. Do modern, sensible queries here.

Test Plan: Viewed project profile, list, member edit, profile edit, used typeahead, changed project image.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7252
This commit is contained in:
epriestley
2013-10-06 17:07:20 -07:00
parent 64e4b3aef4
commit 80f6d00940
6 changed files with 38 additions and 25 deletions

View File

@@ -22,16 +22,13 @@ final class PhabricatorProjectProfileEditController
PhabricatorPolicyCapability::CAN_VIEW,
PhabricatorPolicyCapability::CAN_EDIT,
))
->needProfiles(true)
->executeOne();
if (!$project) {
return new Aphront404Response();
}
$profile = $project->loadProfile();
if (empty($profile)) {
$profile = new PhabricatorProjectProfile();
}
$profile = $project->getProfile();
$img_src = $profile->loadProfileImageURI();
$options = PhabricatorProjectStatus::getStatusMap();