mirror of
https://github.com/friendica/friendica
synced 2025-05-12 04:24:11 +02:00
Remove get_app() in favor of DI::app()
This commit is contained in:
parent
5d20cd7e16
commit
f0eea6f875
26 changed files with 110 additions and 97 deletions
|
@ -57,7 +57,7 @@ class OEmbed
|
|||
{
|
||||
$embedurl = trim($embedurl, '\'"');
|
||||
|
||||
$a = \get_app();
|
||||
$a = DI::app();
|
||||
|
||||
$cache_key = 'oembed:' . $a->videowidth . ':' . $embedurl;
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ use Friendica\Core\Hook;
|
|||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
|
@ -815,7 +816,7 @@ class HTML
|
|||
*/
|
||||
public static function contactBlock()
|
||||
{
|
||||
$a = \get_app();
|
||||
$a = DI::app();
|
||||
|
||||
return ContactBlock::getHTML($a->profile);
|
||||
}
|
||||
|
|
|
@ -302,7 +302,7 @@ class Widget
|
|||
*/
|
||||
public static function categories($baseurl, $selected = '')
|
||||
{
|
||||
$a = \get_app();
|
||||
$a = DI::app();
|
||||
|
||||
$uid = intval($a->profile['profile_uid']);
|
||||
|
||||
|
@ -420,7 +420,7 @@ class Widget
|
|||
*/
|
||||
public static function tagCloud($limit = 50)
|
||||
{
|
||||
$a = \get_app();
|
||||
$a = DI::app();
|
||||
|
||||
$uid = intval($a->profile['profile_uid']);
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace Friendica\Content\Widget;
|
|||
use Friendica\Content\Feature;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
|
||||
/**
|
||||
* TagCloud widget
|
||||
|
@ -24,7 +25,7 @@ class CalendarExport
|
|||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function getHTML() {
|
||||
$a = \get_app();
|
||||
$a = DI::app();
|
||||
|
||||
if (empty($a->data['user'])) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue