filters: cast score expression as integer on save to prevent misscoring

This commit is contained in:
Andrew Dolgov 2011-04-15 11:42:22 +04:00
parent 90e71380ba
commit b6c1201c33
1 changed files with 60 additions and 52 deletions

View File

@ -293,6 +293,10 @@
$action_param = $action_param_label;
}
if ($action_id == 6) {
$action_param = (int) str_replace("+", "", $action_param);
}
$result = db_query($link, "UPDATE ttrss_filters SET
reg_exp = '$reg_exp',
feed_id = $feed_id,
@ -347,6 +351,10 @@
$action_param = $action_param_label;
}
if ($action_id == 6) {
$action_param = (int) str_replace("+", "", $action_param);
}
$result = db_query($link,
"INSERT INTO ttrss_filters (reg_exp,filter_type,owner_uid,feed_id,
action_id, action_param, inverse, filter_param)