diff options
Diffstat (limited to 'classes/article.php')
-rw-r--r-- | classes/article.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/article.php b/classes/article.php index 01f6b5126..e47da8617 100644 --- a/classes/article.php +++ b/classes/article.php @@ -88,6 +88,20 @@ class Article extends Handler_Protected { $owner_uid) { $guid = 'SHA1:' . sha1("ttshared:" . $url . $owner_uid); // include owner_uid to prevent global GUID clash + + if (!$content) { + $pluginhost = new PluginHost(); + $pluginhost->load_all(PluginHost::KIND_ALL, $owner_uid); + + $af_readability = $pluginhost->get_plugin("Af_Readability"); + + if ($af_readability) { + $extracted_content = $af_readability->extract_content($url); + + if ($extracted_content) $content = db_escape_string($extracted_content); + } + } + $content_hash = sha1($content); if ($labels_str != "") { |