]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
fix E_NOTICE in post_dates.php and show the last date, too
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sat, 16 Jan 2010 10:05:10 +0000 (10:05 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sat, 16 Jan 2010 10:05:10 +0000 (10:05 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@584 b3834d28-1941-0410-a4f8-b48e95affb8f

www/api/posts_dates.php

index 9486b4f022ce1c797eb97956b2014a4f3a0d189f..7b1240f48d9bf2f4bd4f62c0e3ce417fb1142437 100644 (file)
@@ -41,6 +41,7 @@ echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<dates tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentUser->getUsername(), 'xml') ."\">\r\n";
 
 $lastdate = null;
+$count    = 0;
 foreach ($bookmarks['bookmarks'] as $row) {
     $thisdate = gmdate('Y-m-d', strtotime($row['bDatetime']));
     if ($thisdate != $lastdate && $lastdate != null) {
@@ -51,6 +52,9 @@ foreach ($bookmarks['bookmarks'] as $row) {
     }
     $lastdate = $thisdate;
 }
+if ($lastdate !== null) {
+    echo "\t<date count=\"". $count .'" date="'. $lastdate ."\" />\r\n";
+}
 
 echo "</dates>";
 ?>
\ No newline at end of file