]> git.wh0rd.org Git - tt-rss.git/commitdiff
createFilter: properly create type 7 filters
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 18 Jan 2009 10:04:54 +0000 (11:04 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 18 Jan 2009 10:04:54 +0000 (11:04 +0100)
modules/pref-filters.php

index ca469d504ea40a54b3362c6476f16ac00c65fd73..f2e3832e2c0cd7eb4fca056d30284468fe5cecf0 100644 (file)
                        $feed_id = db_escape_string($_GET["feed_id"]);
                        $action_id = db_escape_string($_GET["action_id"]); 
                        $action_param = db_escape_string($_GET["action_param"]); 
+                       $action_param_label = db_escape_string($_GET["action_param_label"]); 
                        $inverse = checkbox_to_sql_bool(db_escape_string($_GET["inverse"]));
 
                        # for the time being, no other filters use params anyway...
                                $feed_id = sprintf("'%s'", db_escape_string($feed_id));
                        }
 
+                       /* When processing 'assign label' filters, action_param_label dropbox
+                        * overrides action_param */
+
+                       if ($action_id == 7) {
+                               $action_param = $action_param_label;
+                       }
+
                        $result = db_query($link,
                                "INSERT INTO ttrss_filters (reg_exp,filter_type,owner_uid,feed_id,
                                        action_id, action_param, inverse, filter_param)