create filter: save filter_param to DB

This commit is contained in:
Andrew Dolgov 2008-12-13 13:22:16 +01:00
parent 2362de6d9b
commit a8732d0c75
2 changed files with 7 additions and 4 deletions

View File

@ -360,8 +360,8 @@
print "<span id=\"filter_dlg_date_mod_box\" style=\"display : none\">";
print "<select name=\"filter_date_modifier\">";
print "<option name=\"before\">".__('Before')."</option>";
print "<option name=\"after\">".__('After')."</option>";
print "<option value=\"before\">".__('Before')."</option>";
print "<option value=\"after\">".__('After')."</option>";
print "</select>&nbsp;</span>";
print "<input onkeypress=\"return filterCR(event, createFilter)\"

View File

@ -198,12 +198,15 @@
$feed_id = sprintf("'%s'", db_escape_string($feed_id));
}
# for the time being, no other filters use params anyway...
$filter_param = db_escape_string($_GET["filter_date_modifier"]);
$result = db_query($link,
"INSERT INTO ttrss_filters (reg_exp,filter_type,owner_uid,feed_id,
action_id, action_param, inverse)
action_id, action_param, inverse, filter_param)
VALUES
('$regexp', '$filter_type','".$_SESSION["uid"]."',
$feed_id, '$action_id', '$action_param', $inverse)");
$feed_id, '$action_id', '$action_param', $inverse, '$filter_param')");
if (db_affected_rows($link, $result) != 0) {
print T_sprintf("Created filter <b>%s</b>", htmlspecialchars($regexp));