From 96076424147a11496a4bba6e3ff3151c9ad238f5 Mon Sep 17 00:00:00 2001 From: vrana Date: Fri, 14 Dec 2012 14:07:39 -0800 Subject: [PATCH] Display raw contents of deleted file in Diffusion Test Plan: Display change of deleted file. Use **Show Raw File (Left)**. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4184 --- .../controller/DiffusionBrowseController.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php index 9ed36ea8c0..ecee20a4f2 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseController.php @@ -5,8 +5,15 @@ final class DiffusionBrowseController extends DiffusionController { public function processRequest() { $drequest = $this->diffusionRequest; - $browse_query = DiffusionBrowseQuery::newFromDiffusionRequest($drequest); - $results = $browse_query->loadPaths(); + if ($this->getRequest()->getStr('before')) { + $results = array(); + $is_file = true; + } else { + $browse_query = DiffusionBrowseQuery::newFromDiffusionRequest($drequest); + $results = $browse_query->loadPaths(); + $reason = $browse_query->getReasonForEmptyResultSet(); + $is_file = ($reason == DiffusionBrowseQuery::REASON_IS_FILE); + } $content = array(); @@ -23,8 +30,7 @@ final class DiffusionBrowseController extends DiffusionController { if (!$results) { - if ($browse_query->getReasonForEmptyResultSet() == - DiffusionBrowseQuery::REASON_IS_FILE) { + if ($is_file) { $controller = new DiffusionBrowseFileController($this->getRequest()); $controller->setDiffusionRequest($drequest); $controller->setCurrentApplication($this->getCurrentApplication());