X-Git-Url: https://projects.mako.cc/source/scuttle/blobdiff_plain/c20b44263a89d8bf1a78bfa632daaae3cb4f1da2..4aa12354e396c6f1551076d515e0e7a81bf54266:/index.php?ds=inline diff --git a/index.php b/index.php index b760bd7..2a9d8ab 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,6 @@ logout(); - $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