X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fbookmarklet.php;h=21b2039c5891c97260aae78c34a91c8a84716540;hb=3a751f056298f95a1ddefed796c7a01f27101252;hp=9ae3e28f085feb59d59665439dab9e1fb4be5a13;hpb=da40c96e9a059e1f41ff62bdf7107c9dbfca6dbe;p=friendica.git diff --git a/mod/bookmarklet.php b/mod/bookmarklet.php index 9ae3e28f08..21b2039c58 100644 --- a/mod/bookmarklet.php +++ b/mod/bookmarklet.php @@ -5,6 +5,7 @@ use Friendica\App; use Friendica\Core\ACL; +use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Core\System; use Friendica\Module\Login; @@ -21,11 +22,11 @@ function bookmarklet_content(App $a) { if (!local_user()) { $o = '

' . L10n::t('Login') . '

'; - $o .= Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? false : true); + $o .= Login::form($a->query_string, intval(Config::get('config', 'register_policy')) === REGISTER_CLOSED ? false : true); return $o; } - $referer = normalise_link($_SERVER["HTTP_REFERER"]); + $referer = normalise_link(defaults($_SERVER, 'HTTP_REFERER', '')); $page = normalise_link(System::baseUrl() . "/bookmarklet"); if (!strstr($referer, $page)) { @@ -42,7 +43,7 @@ function bookmarklet_content(App $a) 'bang' => '', 'visitor' => 'block', 'profile_uid' => local_user(), - 'title' => trim($_REQUEST["title"], "*"), + 'title' => trim(defaults($_REQUEST, 'title', ''), "*"), 'content' => $content ]; $o = status_editor($a, $x, 0, false);