aboutsummaryrefslogtreecommitdiff
path: root/templates/toolbar.inc.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-12-05 07:25:04 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-12-05 07:25:04 +0000
commitd6889066c0d285bf59e89b484800443304585b68 (patch)
tree8cc9aa5011a6e6a66061995a6f8186653be9695e /templates/toolbar.inc.php
parentf7ccbde31062488cbf04b3e4c06a9aa590ebfedd (diff)
downloadsemanticscuttle-d6889066c0d285bf59e89b484800443304585b68.tar.gz
semanticscuttle-d6889066c0d285bf59e89b484800443304585b68.tar.bz2
Major Refactoring: finish transforming into object . Put and into header.inc.php.
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@199 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'templates/toolbar.inc.php')
-rw-r--r--templates/toolbar.inc.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/templates/toolbar.inc.php b/templates/toolbar.inc.php
index 0b052e0..a04b6a0 100644
--- a/templates/toolbar.inc.php
+++ b/templates/toolbar.inc.php
@@ -1,10 +1,7 @@
<?php
-$userservice =& ServiceFactory::getServiceInstance('UserService');
if ($userservice->isLoggedOn()) {
- $cUser = $userservice->getCurrentUser();
$cUserId = $userservice->getCurrentUserId();
- $cUsername = $cUser[$userservice->getFieldName('username')];
- $isAdmin = $userservice->isAdmin($cUser[$userservice->getFieldname('primary')]);
+ $cUsername = $currentUser->getUsername();
?>
<ul id="navigation">
@@ -15,7 +12,7 @@ if ($userservice->isLoggedOn()) {
<li><a href="<?php echo createURL('bookmarks', $cUsername . '?action=add'); ?>"><?php echo T_('Add a Bookmark'); ?></a></li>
<li class="access"><?php echo $cUsername?><a href="<?php echo ROOT ?>?action=logout">(<?php echo T_('Log Out'); ?>)</a></li>
<li><a href="<?php echo createURL('about'); ?>"><?php echo T_('About'); ?></a></li>
- <?php if($isAdmin): ?>
+ <?php if($currentUser->isAdmin()): ?>
<li><a href="<?php echo createURL('admin', ''); ?>"><?php echo '['.T_('Admin').']'; ?></a></li>
<?php endif; ?>
@@ -24,7 +21,6 @@ if ($userservice->isLoggedOn()) {
<?php
} else {
?>
-
<ul id="navigation">
<li><a href="<?php echo createURL('populartags'); ?>"><?php echo T_('Popular Tags'); ?></a></li>
<li><a href="<?php echo createURL('about'); ?>"><?php echo T_('About'); ?></a></li>