Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionBrowseController.php
Show First 20 Lines • Show All 703 Lines • ▼ Show 20 Lines | private function buildBeforeResponse($before) { | ||||
$before_uri = $drequest->generateURI( | $before_uri = $drequest->generateURI( | ||||
array( | array( | ||||
'action' => 'browse', | 'action' => 'browse', | ||||
'commit' => $target_commit, | 'commit' => $target_commit, | ||||
'line' => $line, | 'line' => $line, | ||||
'path' => $path, | 'path' => $path, | ||||
)); | )); | ||||
$before_uri = $before_uri->alter('renamed', $renamed); | if ($renamed === null) { | ||||
$before_uri = $before_uri->alter('follow', $follow); | $before_uri->removeQueryParam('renamed'); | ||||
} else { | |||||
$before_uri->replaceQueryParam('renamed', $renamed); | |||||
} | |||||
if ($follow === null) { | |||||
$before_uri->removeQueryParam('follow'); | |||||
} else { | |||||
$before_uri->replaceQueryParam('follow', $follow); | |||||
} | |||||
return id(new AphrontRedirectResponse())->setURI($before_uri); | return id(new AphrontRedirectResponse())->setURI($before_uri); | ||||
} | } | ||||
private function getBeforeLineNumber($target_commit) { | private function getBeforeLineNumber($target_commit) { | ||||
$drequest = $this->getDiffusionRequest(); | $drequest = $this->getDiffusionRequest(); | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
▲ Show 20 Lines • Show All 399 Lines • Show Last 20 Lines |