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 fe6858bed2e55932e5d9d7892aa390cc76ba9bb3..408cb00582d295ba544e4db6bf8878a30ef8fa61 100644 (file)
@@ -156,7 +156,12 @@ class Repository_Post
             if ($bNew) {
                 $db->getIndexer()->addRepo($this->repo);
             } else {
             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
+                );
             }
         }
 
             }
         }