Fixed to prevent the display of an invalid tree.
This commit is contained in:
parent
c3ae1970ca
commit
14e074b122
@ -210,6 +210,13 @@ class IDF_Views_Source
|
|||||||
|
|
||||||
$page_title = $bc.' - '.$title;
|
$page_title = $bc.' - '.$title;
|
||||||
$cobject = $scm->getCommit($commit);
|
$cobject = $scm->getCommit($commit);
|
||||||
|
if (!$cobject) {
|
||||||
|
// Redirect to the first branch
|
||||||
|
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Source::treeBase',
|
||||||
|
array($request->project->shortname,
|
||||||
|
$scm->getMainBranch()));
|
||||||
|
return new Pluf_HTTP_Response_Redirect($url);
|
||||||
|
}
|
||||||
$in_branches = $scm->inBranches($commit, $request_file);
|
$in_branches = $scm->inBranches($commit, $request_file);
|
||||||
$cache = Pluf_Cache::factory();
|
$cache = Pluf_Cache::factory();
|
||||||
$key = sprintf('Project:%s::IDF_Views_Source::tree:%s::%s',
|
$key = sprintf('Project:%s::IDF_Views_Source::tree:%s::%s',
|
||||||
|
Loading…
Reference in New Issue
Block a user