1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-29 17:00:59 +01:00

[diffusion] keep 'view' parameter when clicking on a line number

Summary:
Clicking on a line number will remove the current 'view' the user is in.

This patch retains the current view.

Test Plan:
Open a file in diffusion, and change the view to "blame", clicking on the line
number should retain the same view.

Reviewed By: epriestley
Reviewers: epriestley, jungejason
CC: aran, epriestley, aizatto
Differential Revision: 344
This commit is contained in:
Aizat Faiz 2011-05-25 00:50:20 -07:00
parent d21a056f1c
commit 6c3b1feec8

View file

@ -210,12 +210,13 @@ class DiffusionBrowseFileController extends DiffusionController {
}
private static function buildDisplayRows($text_list, $rev_list, $blame_dict,
private function buildDisplayRows($text_list, $rev_list, $blame_dict,
$needs_blame, DiffusionRequest $drequest, $file_query, $selected) {
$last_rev = null;
$color = null;
$rows = array();
$n = 1;
$view = $this->getRequest()->getStr('view');
if ($blame_dict) {
$epoch_list = ipull($blame_dict, 'epoch');
@ -291,12 +292,13 @@ class DiffusionBrowseFileController extends DiffusionController {
// Create the row display.
$uri_path = $drequest->getUriPath();
$uri_rev = $drequest->getStableCommitName();
$uri_view = $view;
$l = phutil_render_tag(
'a',
array(
'class' => 'diffusion-line-link',
'href' => $uri_path.';'.$uri_rev.'$'.$n,
'href' => $uri_path.';'.$uri_rev.'$'.$n.'?view='.$view,
),
$n);