summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-18 12:23:35 +0100
committerAndrew Dolgov <[email protected]>2009-01-18 12:23:35 +0100
commit814bff66496bb8d57ced77771edcfb4f173ce5ee (patch)
tree459c37e9575e9ca9dde6e9d27af99533656ec485 /functions.php
parentbeb760d5166c2138f25e8a59d93604f712536061 (diff)
add function get_article_labels()
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index 326fa74b5..793fa5f40 100644
--- a/functions.php
+++ b/functions.php
@@ -6008,6 +6008,25 @@
}
}
+ function get_article_labels($link, $id) {
+ $result = db_query($link,
+ "SELECT DISTINCT label_id,caption
+ FROM ttrss_labels2, ttrss_user_labels2
+ WHERE id = label_id
+ AND article_id = '$id'
+ AND owner_uid = ".$_SESSION["uid"]);
+
+ $rv = array();
+
+ while ($line = db_fetch_assoc($result)) {
+ $rk = array($line["label_id"], $line["caption"]);
+ array_push($rv, $rk);
+ }
+
+ return $rv;
+ }
+
+
function label_find_caption($link, $label, $owner_uid) {
$result = db_query($link,
"SELECT caption FROM ttrss_labels2 WHERE id = '$label'