mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Fix wall bugs spawned after recent change in chandler
This commit is contained in:
parent
499ab3f758
commit
5b5f64997b
3 changed files with 6 additions and 9 deletions
|
@ -45,9 +45,6 @@ final class WallPresenter extends OpenVKPresenter
|
|||
|
||||
function renderWall(int $user, bool $embedded = false): void
|
||||
{
|
||||
if(false)
|
||||
exit(tr("forbidden") . ": " . (string) random_int(0, 255));
|
||||
|
||||
$owner = ($user < 0 ? (new Clubs) : (new Users))->get(abs($user));
|
||||
if(is_null($this->user)) {
|
||||
$canPost = false;
|
||||
|
@ -66,7 +63,10 @@ final class WallPresenter extends OpenVKPresenter
|
|||
}
|
||||
|
||||
if ($embedded == true) $this->template->_template = "components/wall.xml";
|
||||
$this->template->oObj = $owner;
|
||||
$this->template->oObj = $owner;
|
||||
if($user < 0)
|
||||
$this->template->club = $owner;
|
||||
|
||||
$this->template->owner = $user;
|
||||
$this->template->canPost = $canPost;
|
||||
$this->template->count = $this->posts->getPostCountOnUserWall($user);
|
||||
|
@ -89,9 +89,6 @@ final class WallPresenter extends OpenVKPresenter
|
|||
|
||||
function renderRSS(int $user): void
|
||||
{
|
||||
if(false)
|
||||
exit(tr("forbidden") . ": " . (string) random_int(0, 255));
|
||||
|
||||
$owner = ($user < 0 ? (new Clubs) : (new Users))->get(abs($user));
|
||||
if(is_null($this->user)) {
|
||||
$canPost = false;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
|
||||
<div n:class="postFeedWrapper, $thisUser->hasMicroblogEnabled() ? postFeedWrapperMicroblog">
|
||||
{include "../components/textArea.xml", route => "/wall" . $thisUser->getId() . "/makePost"}
|
||||
{include "../components/textArea.xml", route => "/wall" . $thisUser->getId() . "/makePost", graffiti => true, polls => true}
|
||||
</div>
|
||||
|
||||
{foreach $posts as $post}
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
</div>
|
||||
<div n:if="$postOpts ?? true" class="post-opts">
|
||||
{var $anonEnabled = OPENVK_ROOT_CONF['openvk']['preferences']['wall']['anonymousPosting']['enable']}
|
||||
|
||||
{if !is_null($thisUser) && !is_null($club ?? NULL) && $owner < 0}
|
||||
{if $club->canBeModifiedBy($thisUser)}
|
||||
<script>
|
||||
|
@ -46,6 +45,7 @@
|
|||
<input type="checkbox" name="nsfw" /> {_contains_nsfw}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div n:if="!($postOpts ?? true) && !is_null($thisUser) && !is_null($club ?? NULL) && $club->canBeModifiedBy($thisUser)" class="post-opts">
|
||||
<label>
|
||||
<input type="checkbox" name="as_group" /> {_comment_as_group}
|
||||
|
|
Loading…
Reference in a new issue