Fixed the case of accessing the log of an unavailable project

master
Loic d'Anterroches 2009-06-26 20:52:56 +02:00
parent 16ce0da5f9
commit c366124917
1 changed files with 5 additions and 0 deletions

View File

@ -65,6 +65,11 @@ class IDF_Views_Source
$title = sprintf(__('%1$s %2$s Change Log'), (string) $request->project,
$this->getScmType($request));
$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();
$commit = $match[2];
if (!$scm->isValidRevision($commit)) {