diff options
author | Andrew Dolgov <[email protected]> | 2021-02-16 18:50:18 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-16 18:50:18 +0300 |
commit | f58c49beaa5e2e0bf924f0ea844ede18abd0bc27 (patch) | |
tree | 7661c1b73af1a20f168f9c4f7911ee87a4d6365a /plugins/af_readability | |
parent | bf88c64d1e1983bf5fad4bae64914d248761ceb5 (diff) |
replace a few more controls to new style
Diffstat (limited to 'plugins/af_readability')
-rwxr-xr-x | plugins/af_readability/init.php | 16 |
1 files changed, 7 insertions, 9 deletions
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 "<fieldset>"; print "<label class='checkbox'> "; - print_checkbox("enable_share_anything", $enable_share_anything); + print \Controls\checkbox_tag("enable_share_anything", $enable_share_anything); print " " . __("Provide full-text services to core code (bookmarklets) and other plugins"); print "</label>"; print "</fieldset>"; - print_button("submit", __("Save"), "class='alt-primary'"); + print "<hr/>"; + + print \Controls\submit_tag(__("Save")); print "</form>"; /* cleanup */ @@ -114,6 +111,7 @@ class Af_Readability extends Plugin { $this->host->set($this, "append_feeds", $append_feeds); if (count($enabled_feeds) > 0) { + print "<hr/>"; print "<h3>" . __("Currently enabled for (click to edit):") . "</h3>"; print "<ul class='panel panel-scrollable list list-unstyled'>"; |