@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix errors when mentioning others in Ponder

Summary: Fixes T9552. We need to set a questionID and the question object (for policy) when initializing a new Answer.

Test Plan: Write an answer that mentions another user.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9552

Differential Revision: https://secure.phabricator.com/D14263

+6 -3
+1 -1
src/applications/ponder/controller/PonderAnswerSaveController.php
··· 32 32 return id(new AphrontDialogResponse())->setDialog($dialog); 33 33 } 34 34 35 - $answer = PonderAnswer::initializeNewAnswer($viewer); 35 + $answer = PonderAnswer::initializeNewAnswer($viewer, $question); 36 36 37 37 // Question Editor 38 38
+5 -2
src/applications/ponder/storage/PonderAnswer.php
··· 26 26 27 27 private $userVotes = array(); 28 28 29 - public static function initializeNewAnswer(PhabricatorUser $actor) { 29 + public static function initializeNewAnswer( 30 + PhabricatorUser $actor, 31 + PonderQuestion $question) { 30 32 $app = id(new PhabricatorApplicationQuery()) 31 33 ->setViewer($actor) 32 34 ->withClasses(array('PhabricatorPonderApplication')) 33 35 ->executeOne(); 34 36 35 37 return id(new PonderAnswer()) 36 - ->setQuestionID(0) 38 + ->setQuestionID($question->getID()) 37 39 ->setContent('') 40 + ->attachQuestion($question) 38 41 ->setAuthorPHID($actor->getPHID()) 39 42 ->setVoteCount(0) 40 43 ->setStatus(PonderAnswerStatus::ANSWER_STATUS_VISIBLE);