]> git.wh0rd.org - tt-rss.git/blobdiff - classes/pref/feeds.php
savefeedorder: properly process Uncategorized
[tt-rss.git] / classes / pref / feeds.php
index 91c504ce4e080c3b1ecaaac1d8c9ebd0376849ef..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"]);
 
@@ -1479,7 +1482,7 @@ class Pref_Feeds extends Handler_Protected {
 
                print "<p>" . __("Use this bookmarklet to publish arbitrary pages using Tiny Tiny RSS") . "</p>";
 
-               $bm_url = htmlspecialchars("javascript:(function(){var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='".SELF_URL_PATH."/public.php?op=sharepopup',l=d.location,e=encodeURIComponent,g=f+'&title='+((e(s))?e(s):e(document.title))+'&url='+e(l.href);function a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=500,height=200')){l.href=g;}}a();})()");
+               $bm_url = htmlspecialchars("javascript:(function(){var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='".SELF_URL_PATH."/public.php?op=sharepopup',l=d.location,e=encodeURIComponent,g=f+'&title='+((e(s))?e(s):e(document.title))+'&url='+e(l.href);function a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=500,height=250')){l.href=g;}}a();})()");
 
                print "<a href=\"$bm_url\" class='bookmarklet'>" . __('Share with Tiny Tiny RSS'). "</a>";