diff --git a/data/templates/editprofile.tpl.php b/data/templates/editprofile.tpl.php
index 258e864..25dc3a4 100644
--- a/data/templates/editprofile.tpl.php
+++ b/data/templates/editprofile.tpl.php
@@ -33,9 +33,7 @@ $this->includeTemplate($GLOBALS['top_include']);
/>
-
-
-
+
|
diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php
index 9a075be..232f9d0 100644
--- a/src/SemanticScuttle/Service/Bookmark.php
+++ b/src/SemanticScuttle/Service/Bookmark.php
@@ -821,23 +821,34 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
// Handle the parts of the query that depend on any tags that are present.
$query_4 = '';
- for ($i = 0; $i < $tagcount; $i ++) {
- $query_2 .= ', '. $b2tservice->getTableName() .' AS T'. $i;
+ if ($tagcount > 0) {
+ $query_2 .= ', '. $b2tservice->getTableName() .' AS T0';
$query_4 .= ' AND (';
+
+ $tagArray = array();
+ for ($i = 0; $i < $tagcount; $i ++) {
+ $tmpTag = $this->db->sql_escape($tags[$i]);
+ $allLinkedTags = $tag2tagservice->getAllLinkedTags(
+ $tmpTag, '>', $user
+ );
- $allLinkedTags = $tag2tagservice->getAllLinkedTags(
- $this->db->sql_escape($tags[$i]), '>', $user
- );
+ while (is_array($allLinkedTags) && count($allLinkedTags)>0) {
+ $tmpValue = array_pop($allLinkedTags);
+ if (in_array($tmpValue, $tagArray) == false) {
+ $tagArray[] = $tmpValue;
+ }
+ }
- while (is_array($allLinkedTags) && count($allLinkedTags)>0) {
- $query_4 .= ' T'. $i .'.tag = "'. array_pop($allLinkedTags) .'"';
- $query_4 .= ' OR';
+ if (in_array($tmpTag, $tagArray) == false) {
+ $tagArray[] = $tmpTag;
+ }
}
-
- $query_4 .= ' T'. $i .'.tag = "'. $this->db->sql_escape($tags[$i]) .'"';
-
- $query_4 .= ') AND T'. $i .'.bId = B.bId';
- //die($query_4);
+ // loop through array of possible tags
+ foreach ($tagArray as $k => $v) {
+ $query_4 .= ' T0.tag = "'. $v .'" OR';
+ }
+ $query_4 = substr($query_4,0,-3);
+ $query_4 .= ') AND T0.bId = B.bId';
}
// Search terms
diff --git a/src/SemanticScuttle/Service/Bookmark2Tag.php b/src/SemanticScuttle/Service/Bookmark2Tag.php
index a10cb61..fc59a1c 100644
--- a/src/SemanticScuttle/Service/Bookmark2Tag.php
+++ b/src/SemanticScuttle/Service/Bookmark2Tag.php
@@ -99,7 +99,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_DbService
$tags_count = is_array($tags)?count($tags):0;
for ($i = 0; $i < $tags_count; $i++) {
- $tags[$i] = trim(strtolower($tags[$i]));
+ $tags[$i] = trim(utf8_strtolower($tags[$i]));
if ($fromApi) {
include_once 'SemanticScuttle/functions.php';
$tags[$i] = convertTag($tags[$i], 'in');
diff --git a/src/SemanticScuttle/Service/Tag.php b/src/SemanticScuttle/Service/Tag.php
index 25d3888..8325285 100644
--- a/src/SemanticScuttle/Service/Tag.php
+++ b/src/SemanticScuttle/Service/Tag.php
@@ -141,10 +141,10 @@ class SemanticScuttle_Service_Tag extends SemanticScuttle_DbService
//normalize
if(!is_array($tags)) {
- $tags = strtolower(trim($tags));
+ $tags = utf8_strtolower(trim($tags));
} else {
for($i=0; $iisLoggedOn()) {
+ $currentUsername = $currentUser->getUsername();
+ if ($userservice->isPrivateKeyValid($currentUser->getPrivateKey())) {
+ array_push(
+ $tplVars['rsschannels'],
+ array(
+ filter($sitename . $rssTitle. sprintf(T_(': (private) ')) . $currentUsername),
+ createURL('rss', filter($currentUsername, 'url') . '?sort='.getSortOrder().'&privatekey='.$currentUser->getPrivateKey())
+ )
+ );
+ }
+ }
+
$tplVars['page'] = $page;
$tplVars['start'] = $start;
$tplVars['bookmarkCount'] = $start + 1;
diff --git a/www/tags.php b/www/tags.php
index a4e6555..09725e4 100644
--- a/www/tags.php
+++ b/www/tags.php
@@ -67,9 +67,22 @@ if ($usecache) {
$tplVars['pagetitle'] = T_('Tags') .': '. $cat;
$tplVars['loadjs'] = true;
$tplVars['rsschannels'] = array(
-array(filter($sitename .': '. $pagetitle), createURL('rss', 'all/'. filter($cat, 'url')).'?sort='.getSortOrder())
+array(filter($sitename .': Tags: '. $cat), createURL('rss', 'all/'. filter($cat, 'url')).'?sort='.getSortOrder())
);
+if ($userservice->isLoggedOn()) {
+ $currentUsername = $currentUser->getUsername();
+ if ($userservice->isPrivateKeyValid($currentUser->getPrivateKey())) {
+ array_push(
+ $tplVars['rsschannels'],
+ array(
+ filter($sitename .': Tags: '. $cat . sprintf(T_(': (private) ')) . $currentUsername),
+ createURL('rss', filter($currentUsername, 'url') . '?sort='.getSortOrder().'&privatekey='.$currentUser->getPrivateKey())
+ )
+ );
+ }
+}
+
// Pagination
$perpage = getPerPageCount($currentUser);
if (intval(GET_PAGE) > 1) {