From: Andrew Dolgov Date: Fri, 29 Jan 2016 12:48:44 +0000 (+0300) Subject: create_published_article: only use readability if enabled in the plugin X-Git-Tag: 16.3~40 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7af2e795784307652ade0e8761232ad3e0c8dd9c;p=tt-rss.git create_published_article: only use readability if enabled in the plugin --- diff --git a/classes/article.php b/classes/article.php index e47da861..9a7c6870 100644 --- a/classes/article.php +++ b/classes/article.php @@ -92,13 +92,18 @@ class Article extends Handler_Protected { if (!$content) { $pluginhost = new PluginHost(); $pluginhost->load_all(PluginHost::KIND_ALL, $owner_uid); + $pluginhost->load_data(); $af_readability = $pluginhost->get_plugin("Af_Readability"); if ($af_readability) { - $extracted_content = $af_readability->extract_content($url); + $enable_share_anything = $pluginhost->get($af_readability, "enable_share_anything"); - if ($extracted_content) $content = db_escape_string($extracted_content); + if ($enable_share_anything) { + $extracted_content = $af_readability->extract_content($url); + + if ($extracted_content) $content = db_escape_string($extracted_content); + } } }