diff options
author | Andrew Dolgov <[email protected]> | 2021-02-26 19:17:27 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-26 19:17:27 +0300 |
commit | ef8c3abd7e9af334a8dae45216d7f5c14c6cee58 (patch) | |
tree | 4f67f22766a73ea94684064f77dac11b06ab3917 | |
parent | 3fd785654372d493c031d9b541ab33a881023a32 (diff) | |
parent | c6fb62f3847b46b628ce4132061f062e12b9cf3b (diff) |
Merge branch 'master' of git.tt-rss.org:fox/tt-rss
-rwxr-xr-x | classes/pref/feeds.php | 2 | ||||
-rw-r--r-- | js/App.js | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 3b4afab26..c7d4f1925 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -710,7 +710,7 @@ class Pref_Feeds extends Handler_Protected { $mark_unread_on_update = checkbox_to_sql_bool( clean($_POST["mark_unread_on_update"] ?? "")); - $feed_language = clean($_POST["feed_language"]); + $feed_language = clean($_POST["feed_language"] ?? ""); if (!$batch) { @@ -52,8 +52,9 @@ const App = { return this.button_tag(value, "", {...{onclick: "App.dialogOf(this).hide()"}, ...attributes}); }, checkbox_tag: function(name, checked = false, value = "", attributes = {}, id = "") { + // checked !== '0' prevents mysql "boolean" false to be implicitly cast as true return `<input dojoType="dijit.form.CheckBox" type="checkbox" name="${App.escapeHtml(name)}" - ${checked ? "checked" : ""} + ${checked !== '0' && checked ? "checked" : ""} ${value ? `value="${App.escapeHtml(value)}"` : ""} ${this.attributes_to_string(attributes)} id="${App.escapeHtml(id)}">` }, |