diff options
author | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2010-01-16 10:05:10 +0000 |
---|---|---|
committer | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2010-01-16 10:05:10 +0000 |
commit | fd332eb5d1ef569dce3c53ce79545377f0faebfe (patch) | |
tree | 0170da07def814948a5140f35106693495a404a6 /www/api | |
parent | 81c10ea65b8b0afac6668535451009917c61463a (diff) | |
download | semanticscuttle-fd332eb5d1ef569dce3c53ce79545377f0faebfe.tar.gz semanticscuttle-fd332eb5d1ef569dce3c53ce79545377f0faebfe.tar.bz2 |
fix E_NOTICE in post_dates.php and show the last date, too
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@584 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'www/api')
-rw-r--r-- | www/api/posts_dates.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/www/api/posts_dates.php b/www/api/posts_dates.php index 9486b4f..7b1240f 100644 --- a/www/api/posts_dates.php +++ b/www/api/posts_dates.php @@ -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 |