mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 13:30: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:
parent
e4608470dd
commit
9607642414
1 changed files with 10 additions and 4 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue