]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Bookmarklet.php
Trim the tag
[friendica.git] / src / Module / Bookmarklet.php
index 408fb50b25eec78226accf43916a6a52a89d28b5..8d64c97e42cb9b1331d2109a33f005d1baa1d0b4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -34,13 +34,13 @@ use Friendica\Util\Strings;
  */
 class Bookmarklet extends BaseModule
 {
-       public static function content()
+       protected function content(array $request = []): string
        {
                $_GET['mode'] = 'minimal';
 
                $config = DI::config();
 
-               if (!local_user()) {
+               if (!DI::userSession()->getLocalUserId()) {
                        $output = '<h2>' . DI::l10n()->t('Login') . '</h2>';
                        $output .= Login::form(DI::args()->getQueryString(), intval($config->get('config', 'register_policy')) === Register::CLOSED ? false : true);
                        return $output;