From c366124917801f23f2607c9fa6d16c1a48b1d4da Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Fri, 26 Jun 2009 20:52:56 +0200 Subject: [PATCH] Fixed the case of accessing the log of an unavailable project --- src/IDF/Views/Source.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/IDF/Views/Source.php b/src/IDF/Views/Source.php index 3753ed8..334ffe8 100644 --- a/src/IDF/Views/Source.php +++ b/src/IDF/Views/Source.php @@ -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)) {