set correct update time when the user edits the paste
authorChristian Weiske <cweiske@cweiske.de>
Thu, 25 Oct 2012 05:46:29 +0000 (07:46 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 25 Oct 2012 05:46:29 +0000 (07:46 +0200)
src/phorkie/Repository/Post.php

index fe6858b..408cb00 100644 (file)
@@ -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
+                );
             }
         }