X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget.php;h=b1e925a6621511c1d2605eb34ee81fb4c9ca9c39;hb=b2ae39db1a41812ca5f67ea20a661b8fdda38ad4;hp=faba55b7a860b483e28022e98909d85eaa2cb899;hpb=ec898ecd2a6a79e1e8a6a9dda94e90393eb08487;p=friendica.git diff --git a/src/Content/Widget.php b/src/Content/Widget.php index faba55b7a8..b1e925a662 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -4,21 +4,25 @@ */ namespace Friendica\Content; -use Friendica\Content\ContactSelector; -use Friendica\Content\Feature; use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Core\PConfig; use Friendica\Core\Protocol; +use Friendica\Core\Renderer; use Friendica\Core\System; +use Friendica\Core\Session; use Friendica\Database\DBA; use Friendica\Model\Contact; +use Friendica\Model\FileTag; use Friendica\Model\GContact; +use Friendica\Model\Item; use Friendica\Model\Profile; - -require_once 'boot.php'; -require_once 'include/dba.php'; +use Friendica\Util\DateTimeFormat; +use Friendica\Util\Proxy as ProxyUtils; +use Friendica\Util\Strings; +use Friendica\Util\Temporal; +use Friendica\Util\XML; class Widget { @@ -26,10 +30,12 @@ class Widget * Return the follow widget * * @param string $value optional, default empty + * @return string + * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ public static function follow($value = "") { - return replace_macros(get_markup_template('follow.tpl'), array( + return Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/follow.tpl'), array( '$connect' => L10n::t('Add New Contact'), '$desc' => L10n::t('Enter address or web location'), '$hint' => L10n::t('Example: bob@example.com, http://example.com/barbara'), @@ -43,11 +49,11 @@ class Widget */ public static function findPeople() { - $a = get_app(); + $a = \get_app(); $global_dir = Config::get('system', 'directory'); if (Config::get('system', 'invitation_only')) { - $x = PConfig::get(local_user(), 'system', 'invites_remaining'); + $x = intval(PConfig::get(local_user(), 'system', 'invites_remaining')); if ($x || is_site_admin()) { $a->page['aside'] .= '