1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Respect view mode on deleted path in Diffusion

Test Plan: /diffusion/X/browse/deleted?view=blame

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2074
This commit is contained in:
vrana 2012-04-02 11:12:42 -07:00
parent f49f1eaa5c
commit c580775d58
2 changed files with 7 additions and 0 deletions

View file

@ -45,6 +45,7 @@ final class DiffusionBrowseController extends DiffusionController {
$empty_result = new DiffusionEmptyResultView(); $empty_result = new DiffusionEmptyResultView();
$empty_result->setDiffusionRequest($drequest); $empty_result->setDiffusionRequest($drequest);
$empty_result->setBrowseQuery($browse_query); $empty_result->setBrowseQuery($browse_query);
$empty_result->setView($this->getRequest()->getStr('view'));
$content[] = $empty_result; $content[] = $empty_result;
} else { } else {

View file

@ -19,11 +19,16 @@
final class DiffusionEmptyResultView extends DiffusionView { final class DiffusionEmptyResultView extends DiffusionView {
private $browseQuery; private $browseQuery;
private $view;
public function setBrowseQuery($browse_query) { public function setBrowseQuery($browse_query) {
$this->browseQuery = $browse_query; $this->browseQuery = $browse_query;
} }
public function setView($view) {
$this->view = $view;
}
public function render() { public function render() {
$drequest = $this->getDiffusionRequest(); $drequest = $this->getDiffusionRequest();
@ -59,6 +64,7 @@ final class DiffusionEmptyResultView extends DiffusionView {
array( array(
'text' => 'existed', 'text' => 'existed',
'commit' => $existed, 'commit' => $existed,
'params' => array('view' => $this->view),
) )
); );