mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
Posts: Online status hotfix
This commit is contained in:
parent
2feaee4be4
commit
931f2a1149
1 changed files with 7 additions and 2 deletions
|
@ -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}
|
||||||
|
|
Loading…
Reference in a new issue