X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget.php;h=f1f8f25fa34921d018123fb88e05861a2ad60226;hb=b852e5842bffcc1df1e5ac5d356fd9f19b7af499;hp=397a1863d339efadf86d739acc6ea95e3d6f3e95;hpb=0472c7b57d0bc6852e9b6eb6aeb8018c384d499f;p=friendica.git diff --git a/src/Content/Widget.php b/src/Content/Widget.php index 397a1863d3..f1f8f25fa3 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -4,24 +4,24 @@ */ 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\DI; use Friendica\Model\Contact; use Friendica\Model\FileTag; use Friendica\Model\GContact; +use Friendica\Model\Item; use Friendica\Model\Profile; -use Friendica\Util\XML; - -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; class Widget { @@ -29,10 +29,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 Renderer::replaceMacros(Renderer::getMarkupTemplate('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'), @@ -46,13 +48,12 @@ class Widget */ public static function findPeople() { - $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'] .= '