Remove Controller->getHandle() and Controller->loadHandles()
Summary: Ref T7689. Modernize all callsites of these methods. Test Plan: - Poked at dashboards. - Pretty sure this code is technically unreachable right now. - Viewed commit; viewed "Audit Status". - Viewed a fund; viewed "Payable to"; viewed "Owner". - Viewed herald rules; viewed "Author"; viewed "Applies To". - Viewed a Legalpad document; viewed "Contributors". - Viewed Phame post list; viewed blog; viewed post (viewed "Blog", viewed "Blogger"). - Viewed a macro; viewed "Audio". - Viewed a Phriction page; viewed "Last Author". - Viewed a Ponder question; viewed "Author". - Viewed a Ponder answer; viewed header. - Behavior changed very slightly here; whatevs. - Viewed a Countdown; viewed "Author". Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T7689 Differential Revision: https://secure.phabricator.com/D12210
This commit is contained in:
@@ -141,15 +141,13 @@ final class PonderQuestionViewController extends PonderController {
|
||||
->setObject($question)
|
||||
->setActionList($actions);
|
||||
|
||||
$this->loadHandles(array($question->getAuthorPHID()));
|
||||
|
||||
$view->addProperty(
|
||||
pht('Status'),
|
||||
PonderQuestionStatus::getQuestionStatusFullName($question->getStatus()));
|
||||
|
||||
$view->addProperty(
|
||||
pht('Author'),
|
||||
$this->getHandle($question->getAuthorPHID())->renderLink());
|
||||
$viewer->renderHandle($question->getAuthorPHID()));
|
||||
|
||||
$view->addProperty(
|
||||
pht('Created'),
|
||||
@@ -221,9 +219,6 @@ final class PonderQuestionViewController extends PonderController {
|
||||
|
||||
$out = array();
|
||||
|
||||
$phids = mpull($answers, 'getAuthorPHID');
|
||||
$this->loadHandles($phids);
|
||||
|
||||
$xactions = id(new PonderAnswerTransactionQuery())
|
||||
->setViewer($viewer)
|
||||
->withTransactionTypes(array(PhabricatorTransactions::TYPE_COMMENT))
|
||||
@@ -253,7 +248,7 @@ final class PonderQuestionViewController extends PonderController {
|
||||
$out[] = id(new PhabricatorAnchorView())
|
||||
->setAnchorName("A$id");
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($this->getHandle($author_phid)->getFullName());
|
||||
->setHeader($viewer->renderHandle($author_phid));
|
||||
|
||||
$actions = $this->buildAnswerActions($answer);
|
||||
$properties = $this->buildAnswerProperties($answer, $actions);
|
||||
|
||||
Reference in New Issue
Block a user