1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

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
This commit is contained in:
vrana 2012-12-14 14:07:39 -08:00
parent e4608470dd
commit 9607642414

View file

@ -5,8 +5,15 @@ final class DiffusionBrowseController extends DiffusionController {
public function processRequest() { public function processRequest() {
$drequest = $this->diffusionRequest; $drequest = $this->diffusionRequest;
if ($this->getRequest()->getStr('before')) {
$results = array();
$is_file = true;
} else {
$browse_query = DiffusionBrowseQuery::newFromDiffusionRequest($drequest); $browse_query = DiffusionBrowseQuery::newFromDiffusionRequest($drequest);
$results = $browse_query->loadPaths(); $results = $browse_query->loadPaths();
$reason = $browse_query->getReasonForEmptyResultSet();
$is_file = ($reason == DiffusionBrowseQuery::REASON_IS_FILE);
}
$content = array(); $content = array();
@ -23,8 +30,7 @@ final class DiffusionBrowseController extends DiffusionController {
if (!$results) { if (!$results) {
if ($browse_query->getReasonForEmptyResultSet() == if ($is_file) {
DiffusionBrowseQuery::REASON_IS_FILE) {
$controller = new DiffusionBrowseFileController($this->getRequest()); $controller = new DiffusionBrowseFileController($this->getRequest());
$controller->setDiffusionRequest($drequest); $controller->setDiffusionRequest($drequest);
$controller->setCurrentApplication($this->getCurrentApplication()); $controller->setCurrentApplication($this->getCurrentApplication());