1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 07:25:54 +00:00

enable support for readability (if af_readability is enabled) in shareanything bookmarklet

This commit is contained in:
Andrew Dolgov
2016-01-29 15:38:05 +03:00
parent 4501d5ef45
commit 666cd33360
2 changed files with 71 additions and 12 deletions

View File

@@ -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 != "") {