Require a viewer for Remarkup rendering

Summary:
Provide a viewer to all remarkup engines.

This fixes commit summaries in Diffusion, which were failing to link because they didn't have a user and thus couldn't see/load `D123`, e.g.

Test Plan: Grepped for engine creation.

Reviewers: vrana

Reviewed By: vrana

CC: aran, edward

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D5152
This commit is contained in:
epriestley
2013-03-04 12:33:05 -08:00
parent 1beda30792
commit 8ae718c2aa
19 changed files with 20 additions and 39 deletions

View File

@@ -33,9 +33,12 @@ final class PhabricatorApplicationTransactionTextDiffDetailView
$whitespace_mode = DifferentialChangesetParser::WHITESPACE_SHOW_ALL;
$markup_engine = new PhabricatorMarkupEngine();
$markup_engine->setViewer($this->getUser());
$parser = new DifferentialChangesetParser();
$parser->setChangeset($changeset);
$parser->setMarkupEngine(new PhabricatorMarkupEngine());
$parser->setMarkupEngine($markup_engine);
$parser->setWhitespaceMode($whitespace_mode);
return $parser->render(0, PHP_INT_MAX, array());