mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-09 16:44:26 +02:00
Many more app-variables removed
This commit is contained in:
parent
e05c1821c2
commit
2502a9192d
30 changed files with 310 additions and 401 deletions
|
@ -801,22 +801,6 @@ class HTML
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get html for contact block.
|
||||
*
|
||||
* @deprecated since version 2019.03
|
||||
* @see ContactBlock::getHTML()
|
||||
* @return string
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public static function contactBlock()
|
||||
{
|
||||
$a = DI::app();
|
||||
|
||||
return ContactBlock::getHTML($a->profile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format contacts as picture links or as text links
|
||||
*
|
||||
|
|
|
@ -334,7 +334,7 @@ class Widget
|
|||
{
|
||||
$a = DI::app();
|
||||
|
||||
$uid = intval($a->profile['uid']);
|
||||
$uid = intval($a->profile_owner);
|
||||
|
||||
if (!Feature::isEnabled($uid, 'categories')) {
|
||||
return '';
|
||||
|
@ -416,23 +416,20 @@ class Widget
|
|||
/**
|
||||
* Insert a tag cloud widget for the present profile.
|
||||
*
|
||||
* @param int $uid User ID
|
||||
* @param int $limit Max number of displayed tags.
|
||||
* @return string HTML formatted output.
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public static function tagCloud($limit = 50)
|
||||
public static function tagCloud(int $uid, int $limit = 50)
|
||||
{
|
||||
$a = DI::app();
|
||||
|
||||
$uid = intval($a->profile['uid']);
|
||||
|
||||
if (!$uid || !$a->profile['url']) {
|
||||
if (empty($uid)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (Feature::isEnabled($uid, 'tagadelic')) {
|
||||
$owner_id = Contact::getIdForURL($a->profile['url'], 0, false);
|
||||
$owner_id = Contact::getPublicIdByUserId($uid);
|
||||
|
||||
if (!$owner_id) {
|
||||
return '';
|
||||
|
|
|
@ -22,8 +22,10 @@
|
|||
namespace Friendica\Content\Widget;
|
||||
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Util\Strings;
|
||||
|
@ -43,6 +45,10 @@ class VCard
|
|||
*/
|
||||
public static function getHTML(array $contact)
|
||||
{
|
||||
if (!isset($contact['network']) || !isset($contact['id'])) {
|
||||
Logger::warning('Incomplete contact', ['contact' => $contact ?? [], 'callstack' => System::callstack(20)]);
|
||||
}
|
||||
|
||||
if (($contact['network'] != '') && ($contact['network'] != Protocol::DFRN)) {
|
||||
$network_link = Strings::formatNetworkName($contact['network'], $contact['url']);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue