From 15b91c7e661d928d8b125ec9cfbda1702319c8b4 Mon Sep 17 00:00:00 2001 From: mensonge Date: Tue, 25 Nov 2008 15:57:29 +0000 Subject: Major refactoring: transform user into object, define parameters used into each file, ... git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@173 b3834d28-1941-0410-a4f8-b48e95affb8f --- users.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'users.php') diff --git a/users.php b/users.php index f79cbfb..c3ba8ac 100644 --- a/users.php +++ b/users.php @@ -21,21 +21,26 @@ require_once('header.inc.php'); +/* Service creation: only useful services are created */ $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $templateservice =& ServiceFactory::getServiceInstance('TemplateService'); $userservice =& ServiceFactory::getServiceInstance('UserService'); $cacheservice =& ServiceFactory::getServiceInstance('CacheService'); -$tplVars = array(); +/* Managing current logged user */ +$currentUser = $userservice->getCurrentObjectUser(); +/* Managing path info */ list($url, $cat) = explode('/', $_SERVER['PATH_INFO']); +$tplVars = array(); + $pagetitle = T_('Users'); if ($usecache) { // Generate hash for caching on if ($userservice->isLoggedOn()) { - $hash = md5($_SERVER['REQUEST_URI'] . $userservice->getCurrentUserID()); + $hash = md5($_SERVER['REQUEST_URI'] . $currentUser->getId()); } else { $hash = md5($_SERVER['REQUEST_URI']); } -- cgit v1.2.3-54-g00ecf