]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
add (disabled) per-feed view_settings handling placeholder
[tt-rss.git] / include / functions.php
index 3bb158c0588464d4b70d9ac8f6f10885aede845c..1c1b73a376480b52bcc3669ded3238ac9dd19cf4 100644 (file)
 
                array_push($ret_arr, $cv);
 
-               $result = db_query($link, "SELECT id AS cat_id, value AS unread,
+               $result = db_query($link, "SELECT id AS cat_id, view_settings, value AS unread,
                        (SELECT COUNT(id) FROM ttrss_feed_categories AS c2
                                WHERE c2.parent_cat = ttrss_feed_categories.id) AS num_children
                        FROM ttrss_feed_categories, ttrss_cat_counters_cache
                while ($line = db_fetch_assoc($result)) {
                        $line["cat_id"] = (int) $line["cat_id"];
 
+                       /* if ($line["view_settings"])
+                               $view_settings = @json_decode($line["view_settings"]);
+                       else
+                               $view_settings = null; */
+
+                       $view_settings = null;
+
                        if ($line["num_children"] > 0) {
                                $child_counter = getCategoryChildrenUnread($link, $line["cat_id"], $_SESSION["uid"]);
                        } else {
                        }
 
                        $cv = array("id" => $line["cat_id"], "kind" => "cat",
+                               "vs" => $view_settings,
                                "counter" => $line["unread"] + $child_counter);
 
                        array_push($ret_arr, $cv);
 
                $ret_arr = array();
 
-               $query = "SELECT ttrss_feeds.id,
+               $query = "SELECT ttrss_feeds.id, view_settings,
                                ttrss_feeds.title,
                                ".SUBSTRING_FOR_DATE."(ttrss_feeds.last_updated,1,19) AS last_updated,
                                last_error, value AS count
                        if (date('Y') - date('Y', strtotime($line['last_updated'])) > 2)
                                $last_updated = '';
 
+                       /* if ($line["view_settings"])
+                               $view_settings = @json_decode($line["view_settings"]);
+                       else
+                               $view_settings = null; */
+
+                       $view_settings = null;
+
                        $cv = array("id" => $id,
                                "updated" => $last_updated,
+                               "vs" => $view_settings,
                                "counter" => (int) $count,
                                "has_img" => (int) $has_img);