X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fbookmarklet.php;h=21b2039c5891c97260aae78c34a91c8a84716540;hb=61693419e8cf571a2ad26690423d356023badc2e;hp=9ae3e28f085feb59d59665439dab9e1fb4be5a13;hpb=a0451e1c6285212ed406b343b97e4a53859a673d;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);