From: Christian Weiske Date: Mon, 7 May 2012 21:10:14 +0000 (+0200) Subject: use addRepo for indexing new repositories X-Git-Tag: v0.2.0~15 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/11e7175bf701e6e08ea19346a4b17bd99304e242 use addRepo for indexing new repositories --- diff --git a/src/phorkie/Repository/Post.php b/src/phorkie/Repository/Post.php index 633fb27..438bf5a 100644 --- a/src/phorkie/Repository/Post.php +++ b/src/phorkie/Repository/Post.php @@ -122,7 +122,11 @@ class Repository_Post //FIXME: index changed files only //also handle file deletions $db = new Database(); - $db->getIndexer()->updateRepo($this->repo); + if ($bNew) { + $db->getIndexer()->addRepo($this->repo); + } else { + $db->getIndexer()->updateRepo($this->repo); + } } return true;