]> git.wh0rd.org Git - tt-rss.git/commitdiff
savefeedorder: properly process Uncategorized
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 6 Nov 2012 11:48:47 +0000 (15:48 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 6 Nov 2012 11:48:47 +0000 (15:48 +0400)
classes/pref/feeds.php

index 8cfa5336a5c2f786f2b34de1e9187016b41c1381..4de3576c88db2e9f412ff80e1d119b053cc7dd6c 100644 (file)
@@ -327,8 +327,11 @@ class Pref_Feeds extends Handler_Protected {
                                                $cat_id = ($item_id != "root") ?
                                                        db_escape_string($bare_item_id) : "NULL";
 
+                                               $cat_qpart = ($cat_id != 0) ? "cat_id = '$cat_id'" :
+                                                       "cat_id = NULL";
+
                                                db_query($this->link, "UPDATE ttrss_feeds
-                                                       SET order_id = $order_id, cat_id = '$cat_id'
+                                                       SET order_id = $order_id, $cat_qpart
                                                        WHERE id = '$bare_id' AND
                                                                owner_uid = " . $_SESSION["uid"]);