Posts: Online status hotfix

This commit is contained in:
Ilya Prokopenko 2021-10-15 18:36:21 +03:00
parent 2feaee4be4
commit 931f2a1149
No known key found for this signature in database
GPG key ID: 7736BBBB05F14A56

View file

@ -1,7 +1,12 @@
{var microblogEnabled = isset($thisUser) ? $thisUser->hasMicroblogEnabled() : false} {var microblogEnabled = isset($thisUser) ? $thisUser->hasMicroblogEnabled() : false}
{if !$post->isPostedOnBehalfOfGroup()}
{var then = date_create("@" . $post->getOwner()->getOnline()->timestamp())}
{var now = date_create()}
{var diff = date_diff($now, $then)}
{/if}
{if $microblogEnabled} {if $microblogEnabled}
{include "post/microblogpost.xml", post => $post} {include "post/microblogpost.xml", post => $post, diff => $diff}
{else} {else}
{include "post/oldpost.xml", post => $post} {include "post/oldpost.xml", post => $post, diff => $diff}
{/if} {/if}