summaryrefslogtreecommitdiff
path: root/classes/dlg.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-08-26 16:54:47 +0400
committerAndrew Dolgov <[email protected]>2012-08-26 16:54:47 +0400
commitda1da2e4d8b3f17ac8f35817d4bb3d1f4b55fbbd (patch)
tree45fc3ea679c01cb91a2bdeb2a952deab37ad108f /classes/dlg.php
parent4c9d0490c6a8c724d04c246cd5ba3cf75ec80259 (diff)
quickAddFilter: prefill current feed in the dialog
Diffstat (limited to 'classes/dlg.php')
-rw-r--r--classes/dlg.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/dlg.php b/classes/dlg.php
index 6a6dace24..c540214a6 100644
--- a/classes/dlg.php
+++ b/classes/dlg.php
@@ -445,7 +445,8 @@ class Dlg extends Handler_Protected {
}
function quickAddFilter() {
- $active_feed_id = db_escape_string($_REQUEST["param"]);
+ $active_feed_id = (int) db_escape_string($_REQUEST["feed"]);
+ $cat_filter = db_escape_string($_REQUEST["is_cat"]) == "true";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-filters\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"quiet\" value=\"1\">";
@@ -497,7 +498,8 @@ class Dlg extends Handler_Protected {
print __("in") . " ";
print "<span id='filterDlg_feeds'>";
- print_feed_select($this->link, "feed_id", $active_feed_id,
+ print_feed_select($this->link, "feed_id",
+ $cat_filter ? "CAT:$active_feed_id" : $active_feed_id,
'dojoType="dijit.form.FilteringSelect"');
print "</span>";