Fixed the case of accessing the log of an unavailable project
This commit is contained in:
parent
16ce0da5f9
commit
c366124917
@ -65,6 +65,11 @@ class IDF_Views_Source
|
|||||||
$title = sprintf(__('%1$s %2$s Change Log'), (string) $request->project,
|
$title = sprintf(__('%1$s %2$s Change Log'), (string) $request->project,
|
||||||
$this->getScmType($request));
|
$this->getScmType($request));
|
||||||
$scm = IDF_Scm::get($request->project);
|
$scm = IDF_Scm::get($request->project);
|
||||||
|
if (!$scm->isAvailable()) {
|
||||||
|
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Source::help',
|
||||||
|
array($request->project->shortname));
|
||||||
|
return new Pluf_HTTP_Response_Redirect($url);
|
||||||
|
}
|
||||||
$branches = $scm->getBranches();
|
$branches = $scm->getBranches();
|
||||||
$commit = $match[2];
|
$commit = $match[2];
|
||||||
if (!$scm->isValidRevision($commit)) {
|
if (!$scm->isValidRevision($commit)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user