X-Git-Url: https://projects.mako.cc/source/scuttle/blobdiff_plain/c20b44263a89d8bf1a78bfa632daaae3cb4f1da2..0b769a1388b7a5daf1829e0f92fa928b007e1ef6:/api/posts_dates.php diff --git a/api/posts_dates.php b/api/posts_dates.php index 7098756..672a312 100644 --- a/api/posts_dates.php +++ b/api/posts_dates.php @@ -3,11 +3,11 @@ // by tag). // Force HTTP authentication first! -require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once 'httpauth.inc.php'; +require_once '../header.inc.php'; $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); -$userservice =& ServiceFactory::getServiceInstance('UserService'); +$userservice =& ServiceFactory::getServiceInstance('UserService'); // Check to see if a tag was specified. if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != '')) @@ -26,17 +26,18 @@ header('Content-Type: text/xml'); echo '\r\n"; echo '\r\n"; +$count = 0; $lastdate = NULL; -foreach($bookmarks['bookmarks'] as $row) { +foreach ($bookmarks['bookmarks'] as $row) { $thisdate = gmdate('Y-m-d', strtotime($row['bDatetime'])); if ($thisdate != $lastdate && $lastdate != NULL) { echo "\t\r\n"; $count = 1; - } else { - $count = $count + 1; + } + else { + $count++; } $lastdate = $thisdate; } echo ""; -?> \ No newline at end of file