summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-18 14:54:40 +0100
committerAndrew Dolgov <[email protected]>2009-01-18 14:54:40 +0100
commite2549229e1a10d8dbb41802d19027741040ab61c (patch)
treea0b6ec0e119345da61e33da5cbb6e5534c03962d /functions.php
parent814bff66496bb8d57ced77771edcfb4f173ce5ee (diff)
display article labels in headlines buffer
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/functions.php b/functions.php
index 793fa5f40..2084e6326 100644
--- a/functions.php
+++ b/functions.php
@@ -1836,13 +1836,13 @@
function initialize_user($link, $uid) {
- db_query($link, "INSERT INTO ttrss_labels2 (owner_uid, caption)
+/* db_query($link, "INSERT INTO ttrss_labels2 (owner_uid, caption)
VALUES ('$uid', 'All Articles')");
db_query($link, "INSERT INTO ttrss_filters
(owner_uid, feed_id, filter_type, reg_exp, enabled,
action_id, action_param, filter_param)
- VALUES ('$uid', NULL, 1, '.', true, 7, 'All Articles', 'before')");
+ VALUES ('$uid', NULL, 1, '.', true, 7, 'All Articles', 'before')"); */
db_query($link, "insert into ttrss_feeds (owner_uid,title,feed_url)
values ('$uid', 'Tiny Tiny RSS: New Releases',
@@ -5001,6 +5001,15 @@
$id = $line["id"];
$feed_id = $line["feed_id"];
+ $labels = get_article_labels($link, $id);
+ $labels_str = "";
+
+ foreach ($labels as $l) {
+ $labels_str .= "<span
+ class='hlLabelRef'>".
+ $l[1]."</span>";
+ }
+
if (count($topmost_article_ids) < 5) {
array_push($topmost_article_ids, $id);
}
@@ -5162,6 +5171,8 @@
print "</a>";
+ print $labels_str;
+
# <a href=\"javascript:viewfeed($feed_id, '', false)\">".
# $line["feed_title"]."</a>
@@ -5267,6 +5278,8 @@
}
}
+ print $labels_str;
+
print "</span></div>";
if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
@@ -6014,7 +6027,8 @@
FROM ttrss_labels2, ttrss_user_labels2
WHERE id = label_id
AND article_id = '$id'
- AND owner_uid = ".$_SESSION["uid"]);
+ AND owner_uid = ".$_SESSION["uid"] . "
+ ORDER BY caption");
$rv = array();