mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-21 20:41:29 +00:00
filters: cast score expression as integer on save to prevent misscoring
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user