Added original date and updated date to bookmark output if different.
authorBart Lantz <bartlantz@gmail.com>
Sat, 17 Dec 2011 19:27:50 +0000 (12:27 -0700)
committerBart Lantz <bartlantz@gmail.com>
Sat, 17 Dec 2011 19:27:50 +0000 (12:27 -0700)
If bModified is different from bDatetime, the bookmark is ordered by modified
time from a previous commit, this commit prints both the modified date as well
as the original date if they are different, to avoid confusion.

templates/bookmarks.tpl.php

index c79655ea229d87fb2c6e2ed31423275583beaf19..d068a9a725a4ca5b1cc6455f04f150ef45e8d41b 100644 (file)
@@ -100,7 +100,11 @@ if (count($bookmarks) > 0) {
         if ($row['bDescription'] != '') {
             echo '<div class="description">'. filter($row['bDescription']) ."</div>\n";
         }
-        echo '<div class="meta">'. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . $cats . $copy . $edit ."</div>\n";
+        if ($row['bDatetime'] == $row['bModified']) {
+            echo '<div class="meta">'. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . $cats . $copy . $edit ."</div>\n";
+        } else {
+            echo '<div class="meta">updated: '. date($GLOBALS['shortdate'], strtotime($row['bModified'])) . ", original: ". date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . $cats . $copy . $edit ."</div>\n";
+        }
         echo "</li>\n";
     }
     ?>

Benjamin Mako Hill || Want to submit a patch?