Fix default values in some components

This commit is contained in:
Celestora 2022-01-02 20:52:53 +02:00
parent 9e01d0adba
commit a115e15a5c
3 changed files with 4 additions and 3 deletions

View file

@ -1,7 +1,7 @@
{var $space = 2}
{var $pageCount = ceil($conf->count / $conf->perPage)}
<div n:if="!($conf->page === 1 && $conf->count <= $conf->perPage)" n:class="paginator, $conf->atBottom ? paginator-at-bottom">
<div n:if="!($conf->page === 1 && $conf->count <= $conf->perPage)" n:class="paginator, ($conf->atBottom ?? false) ? paginator-at-bottom">
{if $conf->page > $space}
<a n:attr="class => ($conf->page === 1 ? 'active')" href="?{http_build_query(array_merge($_GET, ['p' => 1]), 'k', '&', PHP_QUERY_RFC3986)}">«</a>
{/if}

View file

@ -7,7 +7,7 @@
<img
src="{$author->getAvatarURL()}"
width="50" />
{if !$post->isPostedOnBehalfOfGroup() && !$compact}
{if !$post->isPostedOnBehalfOfGroup() && !($compact ?? false)}
<span n:if="$author->isOnline()" class="post-online">
{_online}
</span>

View file

@ -1,4 +1,5 @@
{var textAreaId = $post === null ? rand(1,300) : $post->getId()}
{php if(!isset($GLOBALS["textAreaCtr"])) $GLOBALS["textAreaCtr"] = 10;}
{var textAreaId = ($post ?? NULL) === null ? (++$GLOBALS["textAreaCtr"]) : $post->getId()}
<div id="write" style="padding: 5px 0;" onfocusin="expand_wall_textarea({$textAreaId});">
<form action="{$route}" method="post" enctype="multipart/form-data" style="margin:0;">