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

master
Andrew Dolgov 14 years ago
parent 90e71380ba
commit b6c1201c33

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

Loading…
Cancel
Save