From f58c49beaa5e2e0bf924f0ea844ede18abd0bc27 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 16 Feb 2021 18:50:18 +0300 Subject: replace a few more controls to new style --- plugins/af_readability/init.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'plugins/af_readability/init.php') diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php index 435864c21..b9c4e252e 100755 --- a/plugins/af_readability/init.php +++ b/plugins/af_readability/init.php @@ -18,7 +18,7 @@ class Af_Readability extends Plugin { } function save() { - $enable_share_anything = checkbox_to_sql_bool($_POST["enable_share_anything"]); + $enable_share_anything = checkbox_to_sql_bool($_POST["enable_share_anything"] ?? ""); $this->host->set($this, "enable_share_anything", $enable_share_anything); @@ -29,11 +29,6 @@ class Af_Readability extends Plugin { { $this->host = $host; - if (version_compare(PHP_VERSION, '7.0.0', '<')) { - user_error("af_readability requires PHP 7.0", E_USER_WARNING); - return; - } - $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); $host->add_hook($host::HOOK_PREFS_TAB, $this); $host->add_hook($host::HOOK_PREFS_EDIT_FEED, $this); @@ -91,16 +86,18 @@ class Af_Readability extends Plugin { print \Controls\hidden_tag("method", "save"); print \Controls\hidden_tag("plugin", "af_readability"); - $enable_share_anything = $this->host->get($this, "enable_share_anything"); + $enable_share_anything = sql_bool_to_bool($this->host->get($this, "enable_share_anything")); print "
"; print ""; print "
"; - print_button("submit", __("Save"), "class='alt-primary'"); + print "
"; + + print \Controls\submit_tag(__("Save")); print ""; /* cleanup */ @@ -114,6 +111,7 @@ class Af_Readability extends Plugin { $this->host->set($this, "append_feeds", $append_feeds); if (count($enabled_feeds) > 0) { + print "
"; print "

" . __("Currently enabled for (click to edit):") . "

"; print "