]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Widget/TagCloud.php
Merge pull request #6412 from annando/issue-6149
[friendica.git] / src / Content / Widget / TagCloud.php
index 667cc663d396f462c40eb68d1ccf636f11fff4fd..f214ba799951d882196ee57fb9d4ae00be729cb4 100644 (file)
@@ -7,11 +7,11 @@
 namespace Friendica\Content\Widget;
 
 use Friendica\Core\L10n;
+use Friendica\Core\Renderer;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
-
-require_once 'include/dba.php';
-require_once 'include/security.php';
+use Friendica\Model\Item;
+use Friendica\Util\Security;
 
 /**
  * TagCloud widget
@@ -48,8 +48,8 @@ class TagCloud
                                $tags[] = $tag;
                        }
 
-                       $tpl = get_markup_template('tagblock_widget.tpl');
-                       $o = replace_macros($tpl, [
+                       $tpl = Renderer::getMarkupTemplate('tagblock_widget.tpl');
+                       $o = Renderer::replaceMacros($tpl, [
                                '$title' => L10n::t('Tags'),
                                '$tags' => $tags
                        ]);
@@ -73,7 +73,7 @@ class TagCloud
         */
        private static function tagadelic($uid, $count = 0, $owner_id = 0, $flags = '', $type = TERM_HASHTAG)
        {
-               $sql_options = item_permissions_sql($uid);
+               $sql_options = Item::getPermissionsSQLByUserId($uid);
                $limit = $count ? sprintf('LIMIT %d', intval($count)) : '';
 
                if ($flags) {
@@ -98,7 +98,7 @@ class TagCloud
                        $type,
                        TERM_OBJ_POST
                );
-               if (!DBA::is_result($r)) {
+               if (!DBA::isResult($r)) {
                        return [];
                }