Use setContentSourceFromRequest() in more places

Summary: I introduced this helper at some point, clean up all the code duplication around content sources.

Test Plan: Grepped; hit edit interfaces for most/all of these.

Reviewers: btrahan, chad, edward

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6030
This commit is contained in:
epriestley
2013-05-24 10:48:34 -07:00
parent ee1e04e562
commit 6dda35897a
19 changed files with 31 additions and 107 deletions

View File

@@ -40,12 +40,7 @@ final class PhabricatorMacroCommentController
$editor = id(new PhabricatorMacroEditor())
->setActor($user)
->setContinueOnNoEffect($request->isContinueRequest())
->setContentSource(
PhabricatorContentSource::newForSource(
PhabricatorContentSource::SOURCE_WEB,
array(
'ip' => $request->getRemoteAddr(),
)))
->setContentSourceFromRequest($request)
->setIsPreview($is_preview);
try {