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
$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
]);
*/
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) {
$type,
TERM_OBJ_POST
);
- if (!DBA::is_result($r)) {
+ if (!DBA::isResult($r)) {
return [];
}