From 000cfd76ccd61b8b409713711b6e166d7442aa30 Mon Sep 17 00:00:00 2001
From: Mark Pemberton getLastTagDescription($currenttag)) {
- $cDescription = $cdservice->getLastTagDescription($currenttag);
- echo nl2br(filter($cDescription['cdDescription']));
-} elseif(isset($hash) && $cdservice->getLastBookmarkDescription($hash)) {
- $cDescription = $cdservice->getLastBookmarkDescription($hash);
- echo nl2br(filter($cDescription['cdTitle'])). " getDescription($currenttag, $userObject['uId']);
echo nl2br(filter($pDescription['tDescription']));
//personal tag description edit
-if($userservice->isLoggedOn()) {
- if($currenttag!= '') {
- echo ' ';
- echo strlen($pDescription['tDescription'])==0?T_('Edit your personal description of this tag'):'';
- echo ' ';
- }
+if ($userservice->isLoggedOn()) {
+ if ($currenttag!= '') {
+ echo ' ';
+ echo strlen($pDescription['tDescription'])==0?T_('Edit your personal description of this tag'):'';
+ echo ' ';
+ }
}
?>
@@ -16,9 +16,11 @@ $this->includeTemplate($GLOBALS['top_include']);
-isAdmin()): ?>
-'.T_('Users management').'
';
-
-echo '';
-foreach($users as $user) {
- echo '
';
?>
-includeTemplate('sidebar.tpl');
-$this->includeTemplate($GLOBALS['bottom_include']);
-
-?>
+includeTemplate('sidebar.tpl');
+$this->includeTemplate($GLOBALS['bottom_include']);
+
+?>
diff --git a/data/templates/bookmarkcommondescriptionedit.tpl.php b/data/templates/bookmarkcommondescriptionedit.tpl.php
index af5909a..7b7dc68 100644
--- a/data/templates/bookmarkcommondescriptionedit.tpl.php
+++ b/data/templates/bookmarkcommondescriptionedit.tpl.php
@@ -26,13 +26,13 @@ window.onload = function() {
';
- if($user->getUsername() != $currentUser->getUsername()) {
- echo '
';
- }
-
- echo '
diff --git a/data/templates/bookmarks.tpl.php b/data/templates/bookmarks.tpl.php
index e32d3c9..d316655 100644
--- a/data/templates/bookmarks.tpl.php
+++ b/data/templates/bookmarks.tpl.php
@@ -32,12 +32,12 @@ $this->includeTemplate($GLOBALS['top_include']);
include('search.menu.php');
?>
-
+
-isAdmin($userid) && $pageName != PAGE_WATCHLIST) : ?>
+isAdmin($userid) && $pageName != PAGE_WATCHLIST) : ?>
- 0) {
- echo T_('Last modification:').' '.$description['cdDatetime'].', ';
- $lastUser = $userservice->getUser($description['uId']);
- echo ''.$lastUser['username'].'';
- }
- ?>
+ 0) {
+ echo T_('Last modification:').' '.$description['cdDatetime'].', ';
+ $lastUser = $userservice->getUser($description['uId']);
+ echo ''.$lastUser['username'].'';
+ }
+ ?>
";
- echo nl2br(filter($cDescription['cdDescription'])). "
";
+if ($currenttag!= '' && $cdservice->getLastTagDescription($currenttag)) {
+ $cDescription = $cdservice->getLastTagDescription($currenttag);
+ echo nl2br(filter($cDescription['cdDescription']));
+} elseif (isset($hash) && $cdservice->getLastBookmarkDescription($hash)) {
+ $cDescription = $cdservice->getLastBookmarkDescription($hash);
+ echo nl2br(filter($cDescription['cdTitle'])). "
";
+ echo nl2br(filter($cDescription['cdDescription'])). "
";
}
//common tag description edit
-if($userservice->isLoggedOn()) {
- if($currenttag!= '' && ($GLOBALS['enableCommonTagDescriptionEditedByAll'] || $currentUser->isAdmin())) {
- echo ' ';
- echo !is_array($cDescription) || strlen($cDescription['cdDescription'])==0?T_('Edit the common description of this tag'):'';
- echo ' ';
- } elseif(isset($hash)) {
- echo ' (';
- echo T_('Edit the common description of this bookmark').')';
- }
+if ($userservice->isLoggedOn()) {
+ if ($currenttag!= '' && ($GLOBALS['enableCommonTagDescriptionEditedByAll'] || $currentUser->isAdmin())) {
+ echo ' ';
+ echo !is_array($cDescription) || strlen($cDescription['cdDescription'])==0?T_('Edit the common description of this tag'):'';
+ echo ' ';
+ } elseif (isset($hash)) {
+ echo ' (';
+ echo T_('Edit the common description of this bookmark').')';
+ }
}
?>
'. $bfirst .' / '. $bprev .' / '. $bnext .' / '. $blast .' / '. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ."
\n"; + $pagesBanner = ''. $bfirst .' / '. $bprev .' / '. $bnext .' / '. $blast .' / '. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ."
\n"; - if (getPerPageCount($currentUser) > 10) { - echo $pagesBanner; // display a page banner if too many bookmarks to manage - } + if (getPerPageCount($currentUser) > 10) { + echo $pagesBanner; // display a page banner if too many bookmarks to manage + } ?> @@ -253,87 +253,87 @@ if ($currenttag!= '') { $watchedNames = null; } - foreach ($bookmarks as $key => &$row) { - switch ($row['bStatus']) { - case 0: - $access = ''; - break; - case 1: - $access = ' shared'; - break; - case 2: - $access = ' private'; - break; - } + foreach ($bookmarks as $key => &$row) { + switch ($row['bStatus']) { + case 0: + $access = ''; + break; + case 1: + $access = ' shared'; + break; + case 2: + $access = ' private'; + break; + } - $cats = ''; - $tagsForCopy = ''; - $tags = $row['tags']; - foreach ($tags as $tkey => &$tag) { - $tagcaturl = sprintf( - $cat_url, - filter($row['username'], 'url'), - filter($tag, 'url') - ); - $cats .= sprintf( - '%s, ', - $tagcaturl, filter($tag) - ); - $tagsForCopy .= $tag . ','; - } - $cats = substr($cats, 0, -2); - if ($cats != '') { - $cats = T_('Tags:') . ' ' . $cats; - } + $cats = ''; + $tagsForCopy = ''; + $tags = $row['tags']; + foreach ($tags as $tkey => &$tag) { + $tagcaturl = sprintf( + $cat_url, + filter($row['username'], 'url'), + filter($tag, 'url') + ); + $cats .= sprintf( + '%s, ', + $tagcaturl, filter($tag) + ); + $tagsForCopy .= $tag . ','; + } + $cats = substr($cats, 0, -2); + if ($cats != '') { + $cats = T_('Tags:') . ' ' . $cats; + } - // Edit and delete links - $edit = ''; - if ($bookmarkservice->editAllowed($row)) { - $edit = ' - ' + // Edit and delete links + $edit = ''; + if ($bookmarkservice->editAllowed($row)) { + $edit = ' - ' . T_('Edit') . '' . ''; - } + } - // Last update - $update = ' ('. date($GLOBALS['shortdate'], strtotime($row['bModified'])). ') '; + // Last update + $update = ' ('. date($GLOBALS['shortdate'], strtotime($row['bModified'])). ') '; - // User attribution - $copy = ' ' . T_('by') . ' '; - if ($userservice->isLoggedOn() - && $currentUser->getUsername() == $row['username'] + // User attribution + $copy = ' ' . T_('by') . ' '; + if ($userservice->isLoggedOn() + && $currentUser->getUsername() == $row['username'] ) { - $copy .= T_('you'); - } else { - $copy .= '' + $copy .= T_('you'); + } else { + $copy .= '' . $row['username'] . ''; - } + } - // Udders! - if (!isset($hash)) { - $others = $otherCounts[$row['bAddress']]; - $ostart = ''; - $oend = ''; - switch ($others) { - case 0: - break; - case 1: - $copy .= sprintf(T_(' and %s1 other%s'), $ostart, $oend); - break; - default: - $copy .= sprintf(T_(' and %2$s%1$s others%3$s'), $others, $ostart, $oend); - } - } + // Udders! + if (!isset($hash)) { + $others = $otherCounts[$row['bAddress']]; + $ostart = ''; + $oend = ''; + switch ($others) { + case 0: + break; + case 1: + $copy .= sprintf(T_(' and %s1 other%s'), $ostart, $oend); + break; + default: + $copy .= sprintf(T_(' and %2$s%1$s others%3$s'), $others, $ostart, $oend); + } + } - // Copy link - if ($userservice->isLoggedOn() + // Copy link + if ($userservice->isLoggedOn() && ($currentUser->getId() != $row['uId']) && !$existence[$row['bAddress']] ) { - $copy .= ' - getUsername() @@ -341,40 +341,40 @@ if ($currenttag!= '') { . '" title="'.T_('Copy this bookmark to YOUR bookmarks.').'">' . T_('Copy') . ''; - } + } - // Nofollow option - $rel = ''; - if ($GLOBALS['nofollow']) { - $rel = ' rel="nofollow"'; - } + // Nofollow option + $rel = ''; + if ($GLOBALS['nofollow']) { + $rel = ' rel="nofollow"'; + } - $address = filter($row['bAddress']); - $oaddress = $address; - // Redirection option - if ($GLOBALS['useredir']) { - $address = $GLOBALS['url_redir'] . $address; - } + $address = filter($row['bAddress']); + $oaddress = $address; + // Redirection option + if ($GLOBALS['useredir']) { + $address = $GLOBALS['url_redir'] . $address; + } - // Admin specific design - if ($userservice->isAdmin($row['username']) && $GLOBALS['enableAdminColors']) { - $adminBgClass = ' class="adminBackground"'; - $adminStar = ' '; - } else { - $adminBgClass = ''; - $adminStar = ''; - } + // Admin specific design + if ($userservice->isAdmin($row['username']) && $GLOBALS['enableAdminColors']) { + $adminBgClass = ' class="adminBackground"'; + $adminStar = ' '; + } else { + $adminBgClass = ''; + $adminStar = ''; + } - // Private Note (just visible by the owner and his/her contacts) + // Private Note (just visible by the owner and his/her contacts) if ($watchedNames !== null && ($currentUser->getId() == $row['uId'] || in_array($row['username'], $watchedNames) ) ) { - $privateNoteField = $row['bPrivateNote']; - } else { - $privateNoteField = ''; - } + $privateNoteField = $row['bPrivateNote']; + } else { + $privateNoteField = ''; + } if ($GLOBALS['enableVoting'] && $GLOBALS['hideBelowVoting'] !== null && $row['bVoting'] < $GLOBALS['hideBelowVoting'] @@ -382,57 +382,57 @@ if ($currenttag!= '') { $access .= ' below-threshold'; } - // Output - echo ''.T_('No bookmarks available').'
'; + echo ''.T_('No bookmarks available').'
'; } $this->includeTemplate('sidebar.tpl'); $this->includeTemplate($GLOBALS['bottom_include']); diff --git a/src/SemanticScuttle/DbService.php b/src/SemanticScuttle/DbService.php index 875ee98..c950baf 100644 --- a/src/SemanticScuttle/DbService.php +++ b/src/SemanticScuttle/DbService.php @@ -16,7 +16,7 @@ * * @category Bookmarking * @package SemanticScuttle - * @author Christian Weiske