From 3db02a584cd095fd78dda902119e419a872bc9b0 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 19 Mar 2012 19:17:59 -0700 Subject: [PATCH] Fix some warnings about markup engines in Audit/Diffusion inline comments Summary: Split from D1921. - DifferentialChangesetParser doesn't have this property declared. - We weren't providing a markup engine, which caused some warnings. - This would cause failures if comment caches weren't present. Currently, they always will be though unless someone has wiped them explicitly in the DB. Test Plan: Viewed a diff with inline comments, didn't get any warnings in the log. Reviewers: nh, vrana, btrahan Reviewed By: btrahan CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1925 --- .../parser/changeset/DifferentialChangesetParser.php | 1 + .../diffusion/controller/diff/DiffusionDiffController.php | 2 ++ src/applications/diffusion/controller/diff/__init__.php | 1 + 3 files changed, 4 insertions(+) diff --git a/src/applications/differential/parser/changeset/DifferentialChangesetParser.php b/src/applications/differential/parser/changeset/DifferentialChangesetParser.php index 0440d28494..4a6e94a99f 100644 --- a/src/applications/differential/parser/changeset/DifferentialChangesetParser.php +++ b/src/applications/differential/parser/changeset/DifferentialChangesetParser.php @@ -54,6 +54,7 @@ final class DifferentialChangesetParser { private $lineWidth = 80; private $isTopLevel; private $coverage; + private $markupEngine; const CACHE_VERSION = 4; diff --git a/src/applications/diffusion/controller/diff/DiffusionDiffController.php b/src/applications/diffusion/controller/diff/DiffusionDiffController.php index 464d3e72ca..606cf79c82 100644 --- a/src/applications/diffusion/controller/diff/DiffusionDiffController.php +++ b/src/applications/diffusion/controller/diff/DiffusionDiffController.php @@ -45,6 +45,8 @@ final class DiffusionDiffController extends DiffusionController { $parser = new DifferentialChangesetParser(); $parser->setChangeset($changeset); $parser->setRenderingReference($diff_query->getRenderingReference()); + $parser->setMarkupEngine( + PhabricatorMarkupEngine::newDiffusionMarkupEngine()); $pquery = new DiffusionPathIDQuery(array($changeset->getFilename())); $ids = $pquery->loadPathIDs(); diff --git a/src/applications/diffusion/controller/diff/__init__.php b/src/applications/diffusion/controller/diff/__init__.php index 31dccbcf02..c85129d9ff 100644 --- a/src/applications/diffusion/controller/diff/__init__.php +++ b/src/applications/diffusion/controller/diff/__init__.php @@ -13,6 +13,7 @@ phutil_require_module('phabricator', 'applications/diffusion/controller/base'); phutil_require_module('phabricator', 'applications/diffusion/query/diff/base'); phutil_require_module('phabricator', 'applications/diffusion/query/pathid/base'); phutil_require_module('phabricator', 'applications/diffusion/request/base'); +phutil_require_module('phabricator', 'applications/markup/engine'); phutil_require_module('phabricator', 'applications/phid/handle/data'); phutil_require_module('phabricator', 'infrastructure/diff/response');