]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Bookmarklet.php
Merge pull request #7848 from annando/mail-hooks
[friendica.git] / src / Module / Bookmarklet.php
index 1b6ff384597169eae700e21e3536bb17b9847d09..a50f23c256963e160fb4d501b778cad28fee3e47 100644 (file)
@@ -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)) {
@@ -42,13 +42,13 @@ class Bookmarklet extends BaseModule
                                'allow_location'   => $app->user['allow_location'],
                                'default_location' => $app->user['default-location'],
                                'nickname'         => $app->user['nickname'],
-                               'lockstate'        => ((is_array($app->user) && ((strlen($app->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($app->user['deny_cid'])) || (strlen($app->user['deny_gid'])))) ? 'lock' : 'unlock'),
+                               '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),
                                '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);