mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Groups: If the administrator is hidden, create his posts anonymously
This commit is contained in:
parent
2ee7a141c5
commit
c83947ab09
1 changed files with 11 additions and 2 deletions
|
@ -188,7 +188,16 @@ final class WallPresenter extends OpenVKPresenter
|
||||||
if(false)
|
if(false)
|
||||||
$this->flashFail("err", "Не удалось опубликовать пост", "Пост слишком большой.");
|
$this->flashFail("err", "Не удалось опубликовать пост", "Пост слишком большой.");
|
||||||
|
|
||||||
$anon = OPENVK_ROOT_CONF["openvk"]["preferences"]["wall"]["anonymousPosting"]["enable"] && $this->postParam("anon") === "on";
|
$anon = OPENVK_ROOT_CONF["openvk"]["preferences"]["wall"]["anonymousPosting"]["enable"];
|
||||||
|
if($wallOwner instanceof Club && $this->postParam("as_group") === "on" && $this->postParam("force_sign") !== "on" && $anon) {
|
||||||
|
$manager = $wallOwner->getManager($this->user->identity);
|
||||||
|
if($manager)
|
||||||
|
$anon = $manager->isHidden();
|
||||||
|
elseif($this->user->identity->getId() === $wallOwner->getOwner()->getId())
|
||||||
|
$anon = $wallOwner->isOwnerHidden();
|
||||||
|
} else {
|
||||||
|
$anon = $anon && $this->postParam("anon") === "on";
|
||||||
|
}
|
||||||
|
|
||||||
$flags = 0;
|
$flags = 0;
|
||||||
if($this->postParam("as_group") === "on")
|
if($this->postParam("as_group") === "on")
|
||||||
|
|
Loading…
Reference in a new issue