X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FContent%2FWidget.php;h=f1f8f25fa34921d018123fb88e05861a2ad60226;hb=b852e5842bffcc1df1e5ac5d356fd9f19b7af499;hp=ab9bb8882893f148868b490363c36eadc1ef8a3c;hpb=75398b96d526a22238a3edbf61247f0853b75fa7;p=friendica.git diff --git a/src/Content/Widget.php b/src/Content/Widget.php index ab9bb88828..f1f8f25fa3 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -4,25 +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\DateTimeFormat; +use Friendica\Util\Proxy as ProxyUtils; use Friendica\Util\Strings; -use Friendica\Util\XML; - -require_once 'boot.php'; -require_once 'include/dba.php'; +use Friendica\Util\Temporal; class Widget { @@ -30,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'), @@ -47,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'] .= '