Replace old scary ternary operator with if/else

time to do the fani
This commit is contained in:
celestora 2022-11-16 23:45:06 +02:00 committed by GitHub
parent bf1a443c99
commit b1534afd22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,17 @@
<div class="post-author"> <div class="post-author">
<a href="{$author->getURL()}"><b>{$author->getCanonicalName()}</b></a> <a href="{$author->getURL()}"><b>{$author->getCanonicalName()}</b></a>
<img n:if="$author->isVerified()" class="name-checkmark" src="/assets/packages/static/openvk/img/checkmark.png"> <img n:if="$author->isVerified()" class="name-checkmark" src="/assets/packages/static/openvk/img/checkmark.png">
{$post->isDeactivationMessage() ? ($author->isFemale() ? tr($deac . "_f") : tr($deac . "_m")) : ($post->isPostedOnBehalfOfGroup() ? tr("post_writes_g") : ($author->isFemale() ? tr("post_writes_f") : tr("post_writes_m")))} {if $post->isDeactivationMessage()}
{$author->isFemale() ? tr($deac . "_f") : tr($deac . "_m")}
{elseif $post->isPostedOnBehalfOfGroup()}
{_post_writes_g}
{else}
{if $author->isFemale()}
{_post_writes_f}
{else}
{_post_writes_m}
{/if}
{/if}
{if ($onWallOf ?? false) &&!$post->isPostedOnBehalfOfGroup() && $post->getOwnerPost() !== $post->getTargetWall()} {if ($onWallOf ?? false) &&!$post->isPostedOnBehalfOfGroup() && $post->getOwnerPost() !== $post->getTargetWall()}
{var $wallOwner = $post->getWallOwner()} {var $wallOwner = $post->getWallOwner()}
<a href="{$wallOwner->getURL()}" class="mention" data-mention-ref="{$post->getTargetWall()}"> <a href="{$wallOwner->getURL()}" class="mention" data-mention-ref="{$post->getTargetWall()}">