X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FBookmarklet.php;h=08bac2c1d06bba6add18bc35c669e7b58a6dd4e1;hb=fd706cf9a7a0c4700838a1f00b12d8fd37323b7c;hp=283ab0117b40437838c89a0b90d8ea7b30557393;hpb=62f7510aa7f9ed428364c2f5f172ac0438fdd9cf;p=friendica.git diff --git a/src/Module/Bookmarklet.php b/src/Module/Bookmarklet.php index 283ab0117b..08bac2c1d0 100644 --- a/src/Module/Bookmarklet.php +++ b/src/Module/Bookmarklet.php @@ -14,7 +14,7 @@ use Friendica\Util\Strings; */ class Bookmarklet extends BaseModule { - public static function content() + public static function content(array $parameters = []) { $_GET['mode'] = 'minimal'; @@ -27,7 +27,7 @@ class Bookmarklet extends BaseModule return $output; } - $referer = Strings::normaliseLink(defaults($_SERVER, 'HTTP_REFERER', '')); + $referer = Strings::normaliseLink($_SERVER['HTTP_REFERER'] ?? ''); $page = Strings::normaliseLink($app->getBaseURL() . "/bookmarklet"); if (!strstr($referer, $page)) { @@ -44,11 +44,11 @@ class Bookmarklet extends BaseModule 'nickname' => $app->user['nickname'], 'lockstate' => ((is_array($app->user) && ((strlen($app->user['allow_cid'])) || (strlen($app->user['allow_gid'])) || (strlen($app->user['deny_cid'])) || (strlen($app->user['deny_gid'])))) ? 'lock' : 'unlock'), 'default_perms' => ACL::getDefaultUserPermissions($app->user), - 'acl' => ACL::getFullSelectorHTML($app->user, true), + 'acl' => ACL::getFullSelectorHTML($app->page, $app->user, true), 'bang' => '', 'visitor' => 'block', 'profile_uid' => local_user(), - 'title' => trim(defaults($_REQUEST, 'title', ''), '*'), + 'title' => trim($_REQUEST['title'] ?? '', '*'), 'content' => $content ]; $output = status_editor($app, $x, 0, false);