summaryrefslogtreecommitdiffstatshomepage
path: root/alltags.php
diff options
context:
space:
mode:
authorGravatar mensonge2008-11-25 15:57:29 +0000
committerGravatar mensonge2008-11-25 15:57:29 +0000
commit15b91c7e661d928d8b125ec9cfbda1702319c8b4 (patch)
tree092d474c05e414bb04a8c428b8ff6cb9ccab765d /alltags.php
parent9aafe7551eb5a73739709e72465031db7a1531b4 (diff)
downloadscuttle-15b91c7e661d928d8b125ec9cfbda1702319c8b4.tar.gz
scuttle-15b91c7e661d928d8b125ec9cfbda1702319c8b4.zip
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
Diffstat (limited to 'alltags.php')
-rw-r--r--alltags.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/alltags.php b/alltags.php
index f2520a0..61ad345 100644
--- a/alltags.php
+++ b/alltags.php
@@ -20,11 +20,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
require_once('header.inc.php');
+
+/* Service creation: only useful services are created */
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
$userservice =& ServiceFactory::getServiceInstance('UserService');
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+
+
list($url, $user) = explode('/', $_SERVER['PATH_INFO']);
if (!$user) {
header('Location: '. createURL('populartags'));
@@ -51,8 +55,8 @@ if (isset($user) && $user != '') {
if (is_int($user)) {
$userid = intval($user);
} else {
- if ($userinfo = $userservice->getUserByUsername($user)) {
- $userid =& $userinfo[$userservice->getFieldName('primary')];
+ if ($userinfo = $userservice->getObjectUserByUsername($user)) {
+ $userid = $userinfo->getId();
} else {
$tplVars['error'] = sprintf(T_('User with username %s was not found'), $user);
$templateservice->loadTemplate('error.404.tpl', $tplVars);