summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-12-02 14:07:48 +0300
committerAndrew Dolgov <[email protected]>2017-12-02 14:07:48 +0300
commitda9ea57d1c1602899111df615639d9f013f7226f (patch)
tree7568296421390ad0343a3ccfcae8e283a10e1586 /plugins
parent7ccb4e91ff45cab907b43de1cc36a3b0ab5a025d (diff)
checkbox to sql bool related changes, some more boolean fixes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/af_psql_trgm/init.php4
-rwxr-xr-xplugins/af_readability/init.php4
-rwxr-xr-xplugins/af_redditimgur/init.php4
-rw-r--r--plugins/af_zz_imgproxy/init.php4
4 files changed, 8 insertions, 8 deletions
diff --git a/plugins/af_psql_trgm/init.php b/plugins/af_psql_trgm/init.php
index 175176e0b..7ce385f29 100644
--- a/plugins/af_psql_trgm/init.php
+++ b/plugins/af_psql_trgm/init.php
@@ -12,7 +12,7 @@ class Af_Psql_Trgm extends Plugin {
function save() {
$similarity = (float) db_escape_string($_POST["similarity"]);
$min_title_length = (int) db_escape_string($_POST["min_title_length"]);
- $enable_globally = checkbox_to_sql_bool($_POST["enable_globally"]) == "true";
+ $enable_globally = checkbox_to_sql_bool($_POST["enable_globally"]);
if ($similarity < 0) $similarity = 0;
if ($similarity > 1) $similarity = 1;
@@ -226,7 +226,7 @@ class Af_Psql_Trgm extends Plugin {
$enabled_feeds = $this->host->get($this, "enabled_feeds");
if (!is_array($enabled_feeds)) $enabled_feeds = array();
- $enable = checkbox_to_sql_bool($_POST["trgm_similarity_enabled"]) == 'true';
+ $enable = checkbox_to_sql_bool($_POST["trgm_similarity_enabled"]);
$key = array_search($feed_id, $enabled_feeds);
if ($enable) {
diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php
index 192ad90b6..873eba1ba 100755
--- a/plugins/af_readability/init.php
+++ b/plugins/af_readability/init.php
@@ -14,7 +14,7 @@ class Af_Readability extends Plugin {
}
function save() {
- $enable_share_anything = checkbox_to_sql_bool($_POST["enable_share_anything"]) == "true";
+ $enable_share_anything = checkbox_to_sql_bool($_POST["enable_share_anything"]);
$this->host->set($this, "enable_share_anything", $enable_share_anything);
@@ -112,7 +112,7 @@ class Af_Readability extends Plugin {
$enabled_feeds = $this->host->get($this, "enabled_feeds");
if (!is_array($enabled_feeds)) $enabled_feeds = array();
- $enable = checkbox_to_sql_bool($_POST["af_readability_enabled"]) == 'true';
+ $enable = checkbox_to_sql_bool($_POST["af_readability_enabled"]);
$key = array_search($feed_id, $enabled_feeds);
if ($enable) {
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php
index 8074894fd..82e3226a7 100755
--- a/plugins/af_redditimgur/init.php
+++ b/plugins/af_redditimgur/init.php
@@ -64,8 +64,8 @@ class Af_RedditImgur extends Plugin {
}
function save() {
- $enable_readability = checkbox_to_sql_bool($_POST["enable_readability"]) == "true";
- $enable_content_dupcheck = checkbox_to_sql_bool($_POST["enable_content_dupcheck"]) == "true";
+ $enable_readability = checkbox_to_sql_bool($_POST["enable_readability"]);
+ $enable_content_dupcheck = checkbox_to_sql_bool($_POST["enable_content_dupcheck"]);
$this->host->set($this, "enable_readability", $enable_readability, false);
$this->host->set($this, "enable_content_dupcheck", $enable_content_dupcheck);
diff --git a/plugins/af_zz_imgproxy/init.php b/plugins/af_zz_imgproxy/init.php
index 4cfca4180..a6f008324 100644
--- a/plugins/af_zz_imgproxy/init.php
+++ b/plugins/af_zz_imgproxy/init.php
@@ -241,8 +241,8 @@ class Af_Zz_ImgProxy extends Plugin {
}
function save() {
- $proxy_all = checkbox_to_sql_bool($_POST["proxy_all"]) == "true";
- $disable_cache = checkbox_to_sql_bool($_POST["disable_cache"]) == "true";
+ $proxy_all = checkbox_to_sql_bool($_POST["proxy_all"]);
+ $disable_cache = checkbox_to_sql_bool($_POST["disable_cache"]);
$this->host->set($this, "proxy_all", $proxy_all, false);
$this->host->set($this, "disable_cache", $disable_cache);