mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +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
|
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));
|
$owner = ($user < 0 ? (new Clubs) : (new Users))->get(abs($user));
|
||||||
if(is_null($this->user)) {
|
if(is_null($this->user)) {
|
||||||
$canPost = false;
|
$canPost = false;
|
||||||
|
@ -66,7 +63,10 @@ final class WallPresenter extends OpenVKPresenter
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($embedded == true) $this->template->_template = "components/wall.xml";
|
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->owner = $user;
|
||||||
$this->template->canPost = $canPost;
|
$this->template->canPost = $canPost;
|
||||||
$this->template->count = $this->posts->getPostCountOnUserWall($user);
|
$this->template->count = $this->posts->getPostCountOnUserWall($user);
|
||||||
|
@ -89,9 +89,6 @@ final class WallPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
function renderRSS(int $user): void
|
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));
|
$owner = ($user < 0 ? (new Clubs) : (new Users))->get(abs($user));
|
||||||
if(is_null($this->user)) {
|
if(is_null($this->user)) {
|
||||||
$canPost = false;
|
$canPost = false;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div n:class="postFeedWrapper, $thisUser->hasMicroblogEnabled() ? postFeedWrapperMicroblog">
|
<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>
|
</div>
|
||||||
|
|
||||||
{foreach $posts as $post}
|
{foreach $posts as $post}
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div n:if="$postOpts ?? true" class="post-opts">
|
<div n:if="$postOpts ?? true" class="post-opts">
|
||||||
{var $anonEnabled = OPENVK_ROOT_CONF['openvk']['preferences']['wall']['anonymousPosting']['enable']}
|
{var $anonEnabled = OPENVK_ROOT_CONF['openvk']['preferences']['wall']['anonymousPosting']['enable']}
|
||||||
|
|
||||||
{if !is_null($thisUser) && !is_null($club ?? NULL) && $owner < 0}
|
{if !is_null($thisUser) && !is_null($club ?? NULL) && $owner < 0}
|
||||||
{if $club->canBeModifiedBy($thisUser)}
|
{if $club->canBeModifiedBy($thisUser)}
|
||||||
<script>
|
<script>
|
||||||
|
@ -46,6 +45,7 @@
|
||||||
<input type="checkbox" name="nsfw" /> {_contains_nsfw}
|
<input type="checkbox" name="nsfw" /> {_contains_nsfw}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div n:if="!($postOpts ?? true) && !is_null($thisUser) && !is_null($club ?? NULL) && $club->canBeModifiedBy($thisUser)" class="post-opts">
|
<div n:if="!($postOpts ?? true) && !is_null($thisUser) && !is_null($club ?? NULL) && $club->canBeModifiedBy($thisUser)" class="post-opts">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="as_group" /> {_comment_as_group}
|
<input type="checkbox" name="as_group" /> {_comment_as_group}
|
||||||
|
|
Loading…
Reference in a new issue