1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-13 17:12:07 +02:00

Issue #2802 - Forum - Handling of no 'lastpost' user.

This commit is contained in:
Cameron 2017-10-13 16:41:03 -07:00
parent 8167c96eee
commit a0864c33c2

View File

@ -165,10 +165,16 @@
/**
* @example {TOPIC_LASTPOST_DATE: format=relative}
* @param string $parm['format'] short|long|forum|relative
* @return HTML
* @return string
*/
function sc_topic_lastpost_date($parm=null)
{
if(empty($this->var['thread_total_replies']))
{
return '';
}
$mode = empty($parm['format']) ? 'forum' : $parm['format'];
return e107::getParser()->toDate($this->var['thread_lastpost'], $mode);
}
@ -176,7 +182,8 @@
function sc_topic_lastpost_author($parm=null)
{
if($this->var['thread_views'] || $this->var['thread_total_replies'] > 0)
if($this->var['thread_views'] || !empty($this->var['thread_total_replies']))
{
if($this->var['thread_lastuser_username'])
@ -195,6 +202,8 @@
}
}
return ' - ';
}