diff --git a/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php b/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php index 39d8e363b1..6b2632a658 100644 --- a/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php +++ b/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php @@ -88,7 +88,7 @@ class DiffusionBrowseFileController extends DiffusionController { $file_content->getCorpus()); $data = explode("\n", rtrim($data)); - $uri_path = $request->getPath(); + $uri_path = $drequest->getUriPath(); $uri_rev = $drequest->getCommit(); $color = null; diff --git a/src/applications/diffusion/request/base/DiffusionRequest.php b/src/applications/diffusion/request/base/DiffusionRequest.php index eeadc6e739..c4b89144be 100644 --- a/src/applications/diffusion/request/base/DiffusionRequest.php +++ b/src/applications/diffusion/request/base/DiffusionRequest.php @@ -92,6 +92,10 @@ class DiffusionRequest { return $this->path; } + public function getUriPath() { + return '/diffusion/'.$this->getCallsign().'/browse/'.$this->path; + } + public function getLine() { return $this->line; } diff --git a/src/applications/diffusion/request/git/DiffusionGitRequest.php b/src/applications/diffusion/request/git/DiffusionGitRequest.php index b88e6cf2e3..56351b65eb 100644 --- a/src/applications/diffusion/request/git/DiffusionGitRequest.php +++ b/src/applications/diffusion/request/git/DiffusionGitRequest.php @@ -94,6 +94,11 @@ class DiffusionGitRequest extends DiffusionRequest { throw new Exception("Unable to determine branch!"); } + public function getUriPath() { + return '/diffusion/'.$this->getCallsign().'/browse/'. + $this->branch.'/'.$this->path; + } + public function getCommit() { if ($this->commit) { return $this->commit;