From: Christian Weiske Date: Thu, 25 Oct 2012 05:46:29 +0000 (+0200) Subject: set correct update time when the user edits the paste X-Git-Tag: v0.4.0~95 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/3adbed372c47cbca369253148896bc699985dd8a set correct update time when the user edits the paste --- diff --git a/src/phorkie/Repository/Post.php b/src/phorkie/Repository/Post.php index fe6858b..408cb00 100644 --- a/src/phorkie/Repository/Post.php +++ b/src/phorkie/Repository/Post.php @@ -156,7 +156,12 @@ class Repository_Post if ($bNew) { $db->getIndexer()->addRepo($this->repo); } else { - $db->getIndexer()->updateRepo($this->repo); + $commits = $this->repo->getHistory(); + $db->getIndexer()->updateRepo( + $this->repo, + $commits[count($commits)-1]->committerTime, + $commits[0]->committerTime + ); } }