diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php index ff28167194..ae39382c77 100644 --- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php +++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php @@ -269,11 +269,7 @@ abstract class PhabricatorApplicationTransactionEditor public function setContentSourceFromRequest(AphrontRequest $request) { return $this->setContentSource( - PhabricatorContentSource::newForSource( - PhabricatorContentSource::SOURCE_WEB, - array( - 'ip' => $request->getRemoteAddr(), - ))); + PhabricatorContentSource::newFromRequest($request)); } public function getContentSource() { @@ -571,10 +567,6 @@ abstract class PhabricatorApplicationTransactionEditor $this->mentionedPHIDs = $phids; - if (!$phids) { - return null; - } - if ($object->getPHID()) { // Don't try to subscribe already-subscribed mentions: we want to generate // a dialog about an action having no effect if the user explicitly adds @@ -589,6 +581,10 @@ abstract class PhabricatorApplicationTransactionEditor } $phids = array_values($phids); + if (!$phids) { + return null; + } + $xaction = newv(get_class(head($xactions)), array()); $xaction->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS); $xaction->setNewValue(array('+' => $phids));