summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-11-18 13:59:26 +0100
committerAndrew Dolgov <[email protected]>2005-11-18 13:59:26 +0100
commit3b0948c4abdef0d54779de5e1e25d0c070d4c7bf (patch)
tree0316aba43030208b1cf8e73c44060c810448c220
parent1a7572cb27ec4d4a7461680b7e73f9922708d810 (diff)
sort tags in feedlist output, "technorati tag:" is stripped from tagname
-rw-r--r--backend.php5
-rw-r--r--functions.php2
2 files changed, 5 insertions, 2 deletions
diff --git a/backend.php b/backend.php
index 91853d4b8..2f1e7c2f8 100644
--- a/backend.php
+++ b/backend.php
@@ -258,9 +258,10 @@
$result = db_query($link, "SELECT tag_name,count(ttrss_entries.id) AS count
FROM ttrss_tags,ttrss_entries WHERE
post_id = ttrss_entries.id AND unread = true
- AND ttrss_tags.owner_uid = '$owner_uid' GROUP BY tag_name
+ AND ttrss_tags.owner_uid = '$owner_uid' GROUP BY tag_name
UNION
- select tag_name,0 as count FROM ttrss_tags WHERE owner_uid = '$owner_uid'");
+ select tag_name,0 as count FROM ttrss_tags WHERE owner_uid = '$owner_uid'
+ ORDER BY tag_name");
$tags = array();
diff --git a/functions.php b/functions.php
index 355226e8d..8bf146d7a 100644
--- a/functions.php
+++ b/functions.php
@@ -403,6 +403,8 @@
foreach ($entry_tags as $tag) {
$tag = db_escape_string(strtolower($tag));
+ $tag = str_replace("technorati tag: ", "", $tag);
+
$result = db_query($link, "SELECT id FROM ttrss_tags
WHERE tag_name = '$tag' AND post_id = '$entry_id' AND
owner_uid = ".$_SESSION["uid"]." LIMIT 1");