mirror of
https://github.com/openvk/openvk
synced 2025-07-06 15:59:56 +03:00
Compare commits
1 commit
396780f602
...
d7519d46e3
Author | SHA1 | Date | |
---|---|---|---|
|
d7519d46e3 |
2 changed files with 2 additions and 9 deletions
|
@ -60,11 +60,6 @@ abstract class MediaCollection extends RowModel
|
|||
}
|
||||
}
|
||||
|
||||
public function getOwnerId(): int
|
||||
{
|
||||
return (int) $this->getRecord()->owner;
|
||||
}
|
||||
|
||||
public function getPrettyId(): string
|
||||
{
|
||||
return $this->getRecord()->owner . "_" . $this->getRecord()->id;
|
||||
|
|
|
@ -284,15 +284,13 @@ final class PhotosPresenter extends OpenVKPresenter
|
|||
}
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "GET" || $this->queryParam("act") == "finish") {
|
||||
if (!$album || $album->isCreatedBySystem()) {
|
||||
if (!$album) {
|
||||
$this->flashFail("err", tr("error"), tr("error_adding_to_deleted"));
|
||||
}
|
||||
}
|
||||
|
||||
if ($album && !$album->canBeModifiedBy($this->user->identity)) {
|
||||
if ($album->getOwnerId() != $this->user->id) {
|
||||
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||
}
|
||||
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||
}
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
|
|
Loading…
Reference in a new issue