Fixed not to try to include a document from a non available repository.

This commit is contained in:
Loïc d'Anterroches 2011-01-05 10:28:25 +01:00
parent 80be99890a
commit 90b9279c3a

View File

@ -82,6 +82,9 @@ class IDF_Template_Markdown extends Pluf_Template_Tag
function callbackEmbeddedDoc($m) function callbackEmbeddedDoc($m)
{ {
$scm = IDF_Scm::get($this->request->project); $scm = IDF_Scm::get($this->request->project);
if (!$scm->isAvailable()) {
return $m[0];
}
$view_source = new IDF_Views_Source(); $view_source = new IDF_Views_Source();
$match = array('dummy', $this->request->project->shortname); $match = array('dummy', $this->request->project->shortname);
$match[] = (isset($m[2])) ? $m[2] : $scm->getMainBranch(); $match[] = (isset($m[2])) ? $m[2] : $scm->getMainBranch();