X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget%2FTrendingTags.php;h=3eb7d24069f5e60b5d7f1d584c374cb2a03c8212;hb=61484c3c4c5b02210e60130268e4529e12bfcde0;hp=a7cfa8557643237e6865b59730baaab70c833507;hpb=3e2f0e9ffa60c47f0faecfd472c72439c00dda09;p=friendica.git diff --git a/src/Content/Widget/TrendingTags.php b/src/Content/Widget/TrendingTags.php index a7cfa85576..3eb7d24069 100644 --- a/src/Content/Widget/TrendingTags.php +++ b/src/Content/Widget/TrendingTags.php @@ -1,12 +1,29 @@ . + * + */ namespace Friendica\Content\Widget; -use Friendica\Core\Cache; -use Friendica\Core\L10n; use Friendica\Core\Renderer; -use Friendica\Database\DBA; -use Friendica\Model\Term; +use Friendica\DI; +use Friendica\Model\Tag; /** * Trending tags aside widget for the community pages, handles both local and global scopes @@ -24,15 +41,15 @@ class TrendingTags public static function getHTML($content = 'global', int $period = 24) { if ($content == 'local') { - $tags = Term::getLocalTrendingHashtags($period, 20); + $tags = Tag::getLocalTrendingHashtags($period, 20); } else { - $tags = Term::getGlobalTrendingHashtags($period, 20); + $tags = Tag::getGlobalTrendingHashtags($period, 20); } $tpl = Renderer::getMarkupTemplate('widget/trending_tags.tpl'); $o = Renderer::replaceMacros($tpl, [ - '$title' => L10n::tt('Trending Tags (last %d hour)', 'Trending Tags (last %d hours)', $period), - '$more' => L10n::t('More Trending Tags'), + '$title' => DI::l10n()->tt('Trending Tags (last %d hour)', 'Trending Tags (last %d hours)', $period), + '$more' => DI::l10n()->t('More Trending Tags'), '$tags' => $tags, ]);