From: Michael Date: Sat, 17 Nov 2018 22:56:28 +0000 (+0000) Subject: Allow to delete every post, even public ones X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e2ea4a3dc34f48c11be2c5c48769b502a5533c16;p=friendica.git Allow to delete every post, even public ones --- diff --git a/src/Object/Post.php b/src/Object/Post.php index 17912b96d5..58b11a723c 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -157,11 +157,13 @@ class Post extends BaseObject $shareable = in_array($conv->getProfileOwner(), [0, local_user()]) && $item['private'] != 1; - if (local_user() && Strings::compareLink($a->contact['url'], $item['author-link'])) { - if ($item["event-id"] != 0) { - $edpost = ["events/event/" . $item['event-id'], L10n::t("Edit")]; - } else { - $edpost = ["editpost/" . $item['id'], L10n::t("Edit")]; + if (local_user()) { + if (Strings::compareLink($a->contact['url'], $item['author-link'])) { + if ($item["event-id"] != 0) { + $edpost = ["events/event/" . $item['event-id'], L10n::t("Edit")]; + } else { + $edpost = ["editpost/" . $item['id'], L10n::t("Edit")]; + } } $dropping = in_array($item['uid'], [0, local_user()]); } else { @@ -205,7 +207,7 @@ class Post extends BaseObject 'delete' => $delete, ]; - if (!local_user() || ($item['uid'] == 0)) { + if (!local_user()) { $drop = false; }