summaryrefslogtreecommitdiff
path: root/templates/bookmarks.tpl.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/bookmarks.tpl.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/bookmarks.tpl.php')
-rw-r--r--templates/bookmarks.tpl.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/templates/bookmarks.tpl.php b/templates/bookmarks.tpl.php
index 341358d..efec240 100644
--- a/templates/bookmarks.tpl.php
+++ b/templates/bookmarks.tpl.php
@@ -1,13 +1,10 @@
<?php
/* Service creation: only useful services are created */
-$userservice =& ServiceFactory::getServiceInstance('UserService');
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
$tagservice =& ServiceFactory::getServiceInstance('TagService');
$cdservice =& ServiceFactory::getServiceInstance('CommonDescriptionService');
-// Momentary useful to go to object code
-$currentObjectUser = $userservice->getCurrentObjectUser();
$pageName = isset($pageName)?$pageName:"";
$user = isset($user)?$user:"";
@@ -94,7 +91,7 @@ if(isset($currenttag) && $currenttag!= '') {
//echo T_(' for these tags');
} else if($userservice->isLoggedOn()){
echo ' - ';
- echo '<a href="'. createURL('bookmarks', $currentObjectUser->getUsername().'/'.$currenttag) .'">';
+ echo '<a href="'. createURL('bookmarks', $currentUser->getUsername().'/'.$currenttag) .'">';
echo T_('Only your bookmarks for this tag').'</a>';
//echo T_(' for these tags');
}
@@ -165,9 +162,9 @@ if(isset($currenttag) && $currenttag!= '') {
// Copy link
if ($userservice->isLoggedOn()
- && ($currentObjectUser->getId() != $row['uId'])
- && !$bookmarkservice->bookmarkExists($row['bAddress'], $currentObjectUser->getId())) {
- $copy .= ' - <a href="'. createURL('bookmarks', $currentObjectUser->getUsername() .'?action=add&amp;address='. urlencode($row['bAddress']) .'&amp;title='. urlencode($row['bTitle'])). '&amp;description='.urlencode($row['bDescription']). '&amp;tags='.$tagsForCopy .'">'. T_('Copy') .'</a>';
+ && ($currentUser->getId() != $row['uId'])
+ && !$bookmarkservice->bookmarkExists($row['bAddress'], $currentUser->getId())) {
+ $copy .= ' - <a href="'. createURL('bookmarks', $currentUser->getUsername() .'?action=add&amp;address='. urlencode($row['bAddress']) .'&amp;title='. urlencode($row['bTitle'])). '&amp;description='.urlencode($row['bDescription']). '&amp;tags='.$tagsForCopy .'">'. T_('Copy') .'</a>';
}
// Nofollow option