1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

Fix an exception in Ponder comment saving.

Summary:
Add a `setViewer()` so that PHID loading doesn't throw.

Also remove a period from a button because none of the others have one.

Test Plan: Saved a comment successfully.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4202
This commit is contained in:
Ricky Elrod 2012-12-16 12:01:06 -08:00 committed by epriestley
parent 0a0768515f
commit bad576db92
2 changed files with 2 additions and 1 deletions

View file

@ -18,6 +18,7 @@ final class PonderCommentSaveController extends PonderController {
$target = $request->getStr('target'); $target = $request->getStr('target');
$objects = id(new PhabricatorObjectHandleData(array($target))) $objects = id(new PhabricatorObjectHandleData(array($target)))
->setViewer($user)
->loadHandles(); ->loadHandles();
if (!$objects) { if (!$objects) {
return new Aphront404Response(); return new Aphront404Response();

View file

@ -48,7 +48,7 @@ final class PonderAddAnswerView extends AphrontView {
->setUser($this->user)) ->setUser($this->user))
->appendChild( ->appendChild(
id(new AphrontFormSubmitControl()) id(new AphrontFormSubmitControl())
->setValue($is_serious ? 'Submit' : 'Make it so.')); ->setValue($is_serious ? 'Submit' : 'Make it so'));
$preview = $preview =
'<div class="aphront-panel-flush">'. '<div class="aphront-panel-flush">'.