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

Display Show Raw File link in Diffusion Change View

Summary: NOTE: `renderViewOptionsDropdown()` adds unnecessary parameters to URL but the link just redirects anyway.

Test Plan:
Show Raw File (Left and Right) in SVN and Git.
Verify also Added and Deleted files.

Reviewers: epriestley, aran

Reviewed By: epriestley

CC: Koolvin

Differential Revision: https://secure.phabricator.com/D2370
This commit is contained in:
vrana 2012-05-02 13:13:03 -07:00
parent 63ce372480
commit 81dd92fcdc

View file

@ -31,6 +31,8 @@ final class DiffusionChangeController extends DiffusionController {
return new Aphront404Response();
}
$callsign = $drequest->getRepository()->getCallsign();
$changeset_view = new DifferentialChangesetListView();
$changeset_view->setChangesets(
array(
@ -40,8 +42,20 @@ final class DiffusionChangeController extends DiffusionController {
array(
0 => $diff_query->getRenderingReference(),
));
$raw_params = array(
'action' => 'browse',
'params' => array(
'view' => 'raw',
),
);
$right_uri = $drequest->generateURI($raw_params);
$raw_params['params']['before'] = $drequest->getRawCommit();
$left_uri = $drequest->generateURI($raw_params);
$changeset_view->setRawFileURIs($left_uri, $right_uri);
$changeset_view->setRenderURI(
'/diffusion/'.$drequest->getRepository()->getCallsign().'/diff/');
'/diffusion/'.$callsign.'/diff/');
$changeset_view->setWhitespace(
DifferentialChangesetParser::WHITESPACE_SHOW_ALL);
$changeset_view->setUser($this->getRequest()->getUser());