Allow to delete every post, even public ones

This commit is contained in:
Michael 2018-11-17 22:56:28 +00:00
parent a0589676e8
commit e2ea4a3dc3

View file

@ -157,11 +157,13 @@ class Post extends BaseObject
$shareable = in_array($conv->getProfileOwner(), [0, local_user()]) && $item['private'] != 1; $shareable = in_array($conv->getProfileOwner(), [0, local_user()]) && $item['private'] != 1;
if (local_user() && Strings::compareLink($a->contact['url'], $item['author-link'])) { if (local_user()) {
if ($item["event-id"] != 0) { if (Strings::compareLink($a->contact['url'], $item['author-link'])) {
$edpost = ["events/event/" . $item['event-id'], L10n::t("Edit")]; if ($item["event-id"] != 0) {
} else { $edpost = ["events/event/" . $item['event-id'], L10n::t("Edit")];
$edpost = ["editpost/" . $item['id'], L10n::t("Edit")]; } else {
$edpost = ["editpost/" . $item['id'], L10n::t("Edit")];
}
} }
$dropping = in_array($item['uid'], [0, local_user()]); $dropping = in_array($item['uid'], [0, local_user()]);
} else { } else {
@ -205,7 +207,7 @@ class Post extends BaseObject
'delete' => $delete, 'delete' => $delete,
]; ];
if (!local_user() || ($item['uid'] == 0)) { if (!local_user()) {
$drop = false; $drop = false;
} }