summaryrefslogtreecommitdiff
path: root/classes/article.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-08 16:14:48 +0300
committerAndrew Dolgov <[email protected]>2021-02-08 16:14:48 +0300
commit3b52cea8110541e1e5d8cb06198c11a2ed074b1c (patch)
tree763304f562f8787fa2e56291d032832981b5c436 /classes/article.php
parent1d5c8ee50082dd0221055969283b27f2b09b3bb4 (diff)
move some old-style handlers to new callback ones
Diffstat (limited to 'classes/article.php')
-rwxr-xr-xclasses/article.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/classes/article.php b/classes/article.php
index ff7f11180..de39f05d9 100755
--- a/classes/article.php
+++ b/classes/article.php
@@ -31,14 +31,14 @@ class Article extends Handler_Protected {
$pluginhost->load_all(PluginHost::KIND_ALL, $owner_uid);
//$pluginhost->load_data();
- foreach ($pluginhost->get_hooks(PluginHost::HOOK_GET_FULL_TEXT) as $p) {
- $extracted_content = $p->hook_get_full_text($url);
-
- if ($extracted_content) {
- $content = $extracted_content;
- break;
- }
- }
+ $pluginhost->run_hooks_callback(PluginHost::HOOK_GET_FULL_TEXT,
+ function ($result) use (&$content) {
+ if ($result) {
+ $content = $result;
+ return true;
+ }
+ },
+ $url);
}
$content_hash = sha1($content);