X-Git-Url: https://projects.mako.cc/source/scuttle/blobdiff_plain/d297e7b43dff2c97f05ca2802f150d51c31bfcb3..6b106efb4f8497f1bd9dc334683751508caa176e:/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