@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 new Question in Ponder

Summary: I derped here and broke new questions, also remove old Answer constants

Test Plan: Ask a new question, see it save

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+22 -36
-19
src/applications/ponder/constants/PonderQuestionStatus.php
··· 7 7 const STATUS_CLOSED_OBSOLETE = 'obsolete'; 8 8 const STATUS_CLOSED_DUPLICATE = 'duplicate'; 9 9 10 - const ANSWER_STATUS_VISIBLE = 'visible'; 11 - const ANSWER_STATUS_HIDDEN = 'hidden'; 12 - 13 10 public static function getQuestionStatusMap() { 14 11 return array( 15 12 self::STATUS_OPEN => pht('Open'), ··· 88 85 self::STATUS_CLOSED_DUPLICATE, 89 86 ); 90 87 } 91 - 92 - public static function getAnswerStatusMap() { 93 - return array( 94 - self::ANSWER_STATUS_VISIBLE => pht('Visible'), 95 - self::ANSWER_STATUS_HIDDEN => pht('Hidden'), 96 - ); 97 - } 98 - 99 - public static function getAnswerStatusName($status) { 100 - $map = array( 101 - self::ANSWER_STATUS_VISIBLE => pht('Visible'), 102 - self::ANSWER_STATUS_HIDDEN => pht('Hidden'), 103 - ); 104 - return idx($map, $status, pht('Unknown')); 105 - } 106 - 107 88 108 89 }
+5 -3
src/applications/ponder/controller/PonderQuestionEditController.php
··· 68 68 ->setTransactionType(PonderQuestionTransaction::TYPE_CONTENT) 69 69 ->setNewValue($v_content); 70 70 71 - $xactions[] = id(clone $template) 72 - ->setTransactionType(PonderQuestionTransaction::TYPE_STATUS) 73 - ->setNewValue($v_status); 71 + if (!$is_new) { 72 + $xactions[] = id(clone $template) 73 + ->setTransactionType(PonderQuestionTransaction::TYPE_STATUS) 74 + ->setNewValue($v_status); 75 + } 74 76 75 77 $xactions[] = id(clone $template) 76 78 ->setTransactionType(PhabricatorTransactions::TYPE_VIEW_POLICY)
+17 -14
src/applications/ponder/controller/PonderQuestionViewController.php
··· 171 171 172 172 $view->invokeWillRenderEvent(); 173 173 174 - $view->addSectionHeader( 174 + $details = PhabricatorMarkupEngine::renderOneObject( 175 + $question, 176 + $question->getMarkupField(), 177 + $viewer); 178 + 179 + if ($details) { 180 + $view->addSectionHeader( 175 181 pht('Details'), 176 182 PHUIPropertyListView::ICON_SUMMARY); 177 183 178 - $view->addTextContent( 179 - array( 180 - phutil_tag( 181 - 'div', 182 - array( 183 - 'class' => 'phabricator-remarkup', 184 - ), 185 - PhabricatorMarkupEngine::renderOneObject( 186 - $question, 187 - $question->getMarkupField(), 188 - $viewer)), 189 - )); 190 - 184 + $view->addTextContent( 185 + array( 186 + phutil_tag( 187 + 'div', 188 + array( 189 + 'class' => 'phabricator-remarkup', 190 + ), 191 + $details), 192 + )); 193 + } 191 194 192 195 return $view; 193 196 }