Performance improvements when displaying local posts
[friendica.git/.git] / src / Content / Widget / TrendingTags.php
index b20f807..2bb6e77 100644 (file)
@@ -21,6 +21,7 @@
 
 namespace Friendica\Content\Widget;
 
+use Friendica\Content\Conversation\Entity\Community;
 use Friendica\Core\Renderer;
 use Friendica\DI;
 use Friendica\Model\Tag;
@@ -39,9 +40,9 @@ class TrendingTags
         * @return string Formatted HTML code
         * @throws \Exception
         */
-       public static function getHTML(string $content = 'global', int $period = 24): string
+       public static function getHTML(string $content = Community::GLOBAL, int $period = 24): string
        {
-               if ($content == 'local') {
+               if ($content == Community::LOCAL) {
                        $tags = Tag::getLocalTrendingHashtags($period, 20);
                } else {
                        $tags = Tag::getGlobalTrendingHashtags($period, 20);