]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
add ability to auto-assign articles to labels (bump schema)
[tt-rss.git] / include / functions.php
index 2e230c3c6ef320574ccb316e183cf7ad65fa9786..4d7f61a2bc10faf3e7d99b3a0e1c963cc52d5b31 100644 (file)
@@ -1,6 +1,6 @@
 <?php
        define('EXPECTED_CONFIG_VERSION', 26);
-       define('SCHEMA_VERSION', 97);
+       define('SCHEMA_VERSION', 98);
 
        $fetch_last_error = false;
 
                }
        }
 
+       function get_all_labels($link, $owner_uid) {
+               $rv = array();
+
+               $result = db_query($link, "SELECT fg_color, bg_color, caption FROM ttrss_labels2 WHERE owner_uid = " . $owner_uid);
+
+               while ($line = db_fetch_assoc($result)) {
+                       array_push($rv, $line);
+               }
+
+               return $rv;
+       }
+
        function label_update_cache($link, $id, $labels = false, $force = false) {
 
                if ($force)