From f6f0f216641c2e47f429a05f0d5e2c39d0cd8f89 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 9 Feb 2021 08:24:46 +0300 Subject: [PATCH] make ARTICLE_KIND_ constants class members --- classes/article.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/classes/article.php b/classes/article.php index 6729443a1..305764ed3 100755 --- a/classes/article.php +++ b/classes/article.php @@ -1,5 +1,8 @@ chain_hooks_callback(PluginHost::HOOK_ARTICLE_IMAGE, function ($result) use (&$article_image, &$article_stream, &$content) { list ($article_image, $article_stream, $content) = $result; @@ -750,7 +749,7 @@ class Article extends Handler_Protected { if ($rrr = preg_match("/\/embed\/([\w-]+)/", $e->getAttribute("src"), $matches)) { $article_image = "https://img.youtube.com/vi/" . $matches[1] . "/hqdefault.jpg"; $article_stream = "https://youtu.be/" . $matches[1]; - $article_kind = ARTICLE_KIND_YOUTUBE; + $article_kind = Article::ARTICLE_KIND_YOUTUBE; break; } } else if ($e->nodeName == "video") { @@ -760,7 +759,7 @@ class Article extends Handler_Protected { if ($src) { $article_stream = $src->getAttribute("src"); - $article_kind = ARTICLE_KIND_VIDEO; + $article_kind = Article::ARTICLE_KIND_VIDEO; } break; @@ -785,7 +784,7 @@ class Article extends Handler_Protected { $article_image = rewrite_relative_url($site_url, $article_image); if (!$article_kind && (count($enclosures) > 1 || (isset($elems) && $elems->length > 1))) - $article_kind = ARTICLE_KIND_ALBUM; + $article_kind = Article::ARTICLE_KIND_ALBUM; } if ($article_stream)