}
function savefilterorder() {
- $data = json_decode(clean($_POST['payload']), true);
+ $data = json_decode($_POST['payload'], true);
#file_put_contents("/tmp/saveorder.json", clean($_POST['payload']));
#$data = json_decode(file_get_contents("/tmp/saveorder.json"), true);
$match_ok = false;
if ($filter_search) {
- $rules_sth = $this->pdo->prepare("SELECT reg_exp
+ $rules_sth = $this->pdo->prepare("SELECT reg_exp
FROM ttrss_filters2_rules WHERE filter_id = ?");
$rules_sth->execute([$line['id']]);
$filter_id = clean($_REQUEST["id"]);
- $sth = $this->pdo->prepare("SELECT * FROM ttrss_filters2
+ $sth = $this->pdo->prepare("SELECT * FROM ttrss_filters2
WHERE id = ? AND owner_uid = ?");
$sth->execute([$filter_id, $_SESSION['uid']]);
print "<div class=\"dlgButtons\">";
print "<div style=\"float : left\">";
- print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').removeFilter()\">".
+ print "<button dojoType=\"dijit.form.Button\" class=\"btn-danger\" onclick=\"return dijit.byId('filterEditDlg').removeFilter()\">".
__('Remove')."</button>";
print "</div>";
print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').test()\">".
__('Test')."</button> ";
- print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').execute()\">".
+ print "<button dojoType=\"dijit.form.Button\" type=\"submit\" class=\"btn-primary\" onclick=\"return dijit.byId('filterEditDlg').execute()\">".
__('Save')."</button> ";
print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').hide()\">".
__('Cancel')."</button>";
print "</div>";
-
+ print "</form>";
+
}
}
$ids = explode(",", clean($_REQUEST["ids"]));
$ids_qmarks = arr_qmarks($ids);
- $sth = $this->pdo->prepare("DELETE FROM ttrss_filters2 WHERE id IN ($ids_qmarks)
+ $sth = $this->pdo->prepare("DELETE FROM ttrss_filters2 WHERE id IN ($ids_qmarks)
AND owner_uid = ?");
$sth->execute(array_merge($ids, [$_SESSION['uid']]));
}
if (!is_array(clean($_REQUEST["rule"]))) $_REQUEST["rule"] = [];
if (!is_array(clean($_REQUEST["action"]))) $_REQUEST["action"] = [];
-
+
if ($filter_id) {
/* create rules */
$inverse_checked = "";
}
- print "<form name='filter_new_rule_form' id='filter_new_rule_form'>";
+ print "<form name='filter_new_rule_form' id='filter_new_rule_form' onsubmit='return false;'>";
$res = $this->pdo->query("SELECT id,description
FROM ttrss_filter_types WHERE id != 5 ORDER BY description");
style=\"font-size : 16px; width : 20em;\"
name=\"reg_exp\" value=\"$reg_exp\"/>";
+ print "<div dojoType=\"dijit.Tooltip\" connectId=\"filterDlg_regExp\" position=\"below\">
+ ".__("Regular expression, without outer delimiters (i.e. slashes)")."
+ </div>";
+
print "<hr/>";
print "<input id=\"filterDlg_inverse\" dojoType=\"dijit.form.CheckBox\"
name=\"inverse\" $inverse_checked/>";
</div>";
- print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterNewRuleDlg').execute()\">".
+ print "<button dojoType=\"dijit.form.Button\" class=\"btn-primary \" type=\"submit\" onclick=\"return dijit.byId('filterNewRuleDlg').execute()\">".
($rule ? __("Save rule") : __('Add rule'))."</button> ";
print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterNewRuleDlg').hide()\">".
$action_id = 0;
}
- print "<form name='filter_new_action_form' id='filter_new_action_form'>";
+ print "<form name='filter_new_action_form' id='filter_new_action_form' onsubmit='return false;'>";
print "<div class=\"dlgSec\">".__("Perform Action")."</div>";
print "<div class=\"dlgButtons\">";
- print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterNewActionDlg').execute()\">".
+ print "<button dojoType=\"dijit.form.Button\" class=\"btn-primary\" type=\"submit\" onclick=\"return dijit.byId('filterNewActionDlg').execute()\">".
($action ? __("Save action") : __('Add action'))."</button> ";
print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterNewActionDlg').hide()\">".
$title = sprintf(_ngettext("%s (%d rule)", "%s (%d rules)", (int) $num_rules), $title, $num_rules);
- $sth = $this->pdo->prepare("SELECT * FROM ttrss_filters2_actions
+ $sth = $this->pdo->prepare("SELECT * FROM ttrss_filters2_actions
WHERE filter_id = ? ORDER BY id LIMIT 1");
$sth->execute([$id]);
$this->pdo->commit();
}
-}
\ No newline at end of file
+}