1
0
Fork 0

And again, and again, and again, ... some more notices removed (#5601)

* And again, and again, and again, ... some more notices removed

* And some more notices ...

* Some more place
This commit is contained in:
Michael Vogel 2018-08-11 23:05:42 +02:00 committed by Hypolite Petovan
commit 880b7177c8
5 changed files with 11 additions and 5 deletions

View file

@ -26,7 +26,7 @@ function bookmarklet_content(App $a)
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)) {
@ -43,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);

View file

@ -395,12 +395,12 @@ function item_post(App $a) {
$tagged[] = $tag;
}
// When the forum is private or the forum is addressed with a "!" make the post private
if (is_array($success['contact']) && ($success['contact']['prv'] || ($tag_type == '!'))) {
if (is_array($success['contact']) && (!empty($success['contact']['prv']) || ($tag_type == '!'))) {
$private_forum = $success['contact']['prv'];
$only_to_forum = ($tag_type == '!');
$private_id = $success['contact']['id'];
$forum_contact = $success['contact'];
} elseif (is_array($success['contact']) && $success['contact']['forum'] &&
} elseif (is_array($success['contact']) && !empty($success['contact']['forum']) &&
($str_contact_allow == '<' . $success['contact']['id'] . '>')) {
$private_forum = false;
$only_to_forum = true;