mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 21:40: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() {
|
public function processRequest() {
|
||||||
$drequest = $this->diffusionRequest;
|
$drequest = $this->diffusionRequest;
|
||||||
|
|
||||||
$browse_query = DiffusionBrowseQuery::newFromDiffusionRequest($drequest);
|
if ($this->getRequest()->getStr('before')) {
|
||||||
$results = $browse_query->loadPaths();
|
$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();
|
$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());
|
||||||
|
|
Loading…
Reference in a new issue