[ticket/12459] Fix: the posts were always marked as unapproved

the database return a string, so the strict comparison always returned false

PHPBB3-12459
This commit is contained in:
Tristan Darricau 2014-04-17 20:00:06 +02:00 committed by Tristan Darricau
parent 3b823465db
commit 68293450f9

View file

@ -46,7 +46,7 @@ abstract class post_base extends \phpbb\feed\attachments_base
{ {
$item_row['statistics'] = $this->user->lang['POSTED'] . ' ' . $this->user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row) $item_row['statistics'] = $this->user->lang['POSTED'] . ' ' . $this->user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
. ' ' . $this->separator_stats . ' ' . $this->user->format_date($row[$this->get('published')]) . ' ' . $this->separator_stats . ' ' . $this->user->format_date($row[$this->get('published')])
. (($this->is_moderator_approve_forum($row['forum_id']) && $row['post_visibility'] !== ITEM_APPROVED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_UNAPPROVED'] : ''); . (($this->is_moderator_approve_forum($row['forum_id']) && (int)$row['post_visibility'] !== ITEM_APPROVED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_UNAPPROVED'] : '');
} }
} }
} }