summaryrefslogtreecommitdiff
path: root/alltags.php
diff options
context:
space:
mode:
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);