diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-25 15:57:29 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-25 15:57:29 +0000 |
commit | 15b91c7e661d928d8b125ec9cfbda1702319c8b4 (patch) | |
tree | 092d474c05e414bb04a8c428b8ff6cb9ccab765d /templates/userlist.tpl.php | |
parent | 9aafe7551eb5a73739709e72465031db7a1531b4 (diff) | |
download | semanticscuttle-15b91c7e661d928d8b125ec9cfbda1702319c8b4.tar.gz semanticscuttle-15b91c7e661d928d8b125ec9cfbda1702319c8b4.tar.bz2 |
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 'templates/userlist.tpl.php')
-rw-r--r-- | templates/userlist.tpl.php | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/templates/userlist.tpl.php b/templates/userlist.tpl.php index e05ea6d..85c1998 100644 --- a/templates/userlist.tpl.php +++ b/templates/userlist.tpl.php @@ -1,27 +1,24 @@ <?php
-
+ +/* Service creation: only useful services are created */
$userservice =& ServiceFactory::getServiceInstance('UserService'); -$currentUser = $userservice->getCurrentUser();
-$currentUserID = $userservice->getCurrentUserId();
-$currentUsername = $currentUser[$userservice->getFieldName('username')]; -
+$currentObjectUser = $userservice->getCurrentObjectUser();
$this->includeTemplate($GLOBALS['top_include']);
echo '<ol id="bookmarks">';
-
-foreach(array_keys($users) as $key) {
-
+ +foreach($users as $user) {
echo '<li class="xfolkentry">'."\n";
echo '<div class="link">';
- echo '<a href="'.createURL('profile', $users[$key][$userservice->getFieldname('username')]).'">'.$users[$key][$userservice->getFieldName('username')].'</a>';
+ echo '<a href="'.createURL('profile', $user->getUsername()).'">'.$user->getUsername().'</a>';
echo '</div>';
- if($users[$key][$userservice->getFieldName('username')] != $currentUsername) {
+ if($user->getUsername() != $currentObjectUser->getUsername()) {
echo '<div class="meta">';
- echo '<a href="'.createURL('admin','delete/'.$users[$key][$userservice->getFieldname('username')]).'" onclick="return confirm(\''.T_('Are you sure?').'\');">'.T_('Delete').'</a>';
+ echo '<a href="'.createURL('admin','delete/'.$user->getUsername()).'" onclick="return confirm(\''.T_('Are you sure?').'\');">'.T_('Delete').'</a>';
echo '</div>'; }
|