<?php
/***************************************************************************
-Copyright (C) 2004 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2004 - 2010 Marcus Campbell
http://scuttle.org/
This program is free software; you can redistribute it and/or modify
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
-require_once('header.inc.php');
+require_once 'header.inc.php';
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
$tplvars = array();
-if (isset($_GET['action'])){
- if ($_GET['action'] == "logout") {
- $userservice->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
// 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');
// Cache output if existing copy has expired
$cacheservice->End($hash);
}
-?>
\ No newline at end of file