X-Git-Url: https://projects.mako.cc/source/scuttle/blobdiff_plain/c7f63c8b9b12efd7b3c10b9f80cda06eaf32068f..e03e075e4bc21843ae223caf0c149b289e9636c9:/index.php?ds=sidebyside diff --git a/index.php b/index.php index f89e64e..2a9d8ab 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,6 @@ logout($path); - $tplvars['msg'] = T_('You have now logged out'); - } +if (isset($_GET['action']) && 'logout' == $_GET['action']) { + $userservice->logout($path); + $tplvars['msg'] = T_('You have now logged out'); } // Header variables @@ -53,26 +50,16 @@ if ($usecache) { // Pagination $perpage = getPerPageCount(); -if (isset($_GET['page']) && intval($_GET['page']) > 1) { - $page = $_GET['page']; - $start = ($page - 1) * $perpage; -} else { - $page = 0; - $start = 0; -} - -$dtend = date('Y-m-d H:i:s', strtotime('tomorrow')); -$dtstart = date('Y-m-d H:i:s', strtotime($dtend .' -'. $defaultRecentDays .' days')); -$tplVars['page'] = $page; -$tplVars['start'] = $start; +$tplVars['page'] = 0; +$tplVars['start'] = 0; $tplVars['popCount'] = 30; $tplVars['sidebar_blocks'] = array('recent'); $tplVars['range'] = 'all'; $tplVars['pagetitle'] = T_('Store, share and tag your favourite links'); $tplVars['subtitle'] = T_('Recent Bookmarks'); -$tplVars['bookmarkCount'] = $start + 1; -$bookmarks =& $bookmarkservice->getBookmarks($start, $perpage, NULL, NULL, NULL, getSortOrder(), NULL, $dtstart, $dtend); +$tplVars['bookmarkCount'] = 1; +$bookmarks =& $bookmarkservice->getBookmarks(0, $perpage, NULL, NULL, NULL, getSortOrder(), NULL); $tplVars['total'] = $bookmarks['total']; $tplVars['bookmarks'] =& $bookmarks['bookmarks']; $tplVars['cat_url'] = createURL('tags', '%2$s'); @@ -84,4 +71,3 @@ if ($usecache) { // Cache output if existing copy has expired $cacheservice->End($hash); } -?> \ No newline at end of file