Bugfix: pm_unreadcount cache not working correctly

This commit is contained in:
Michael Foster 2013-08-30 08:38:14 +10:00
parent 738179c766
commit 8921eb9c1a

View File

@ -92,7 +92,7 @@ function mod_dashboard() {
} }
} }
if (!$config['cache']['enabled'] || ($args['unread_pms'] = cache::get('pm_unreadcount_' . $mod['id'])) == false) { if (!$config['cache']['enabled'] || ($args['unread_pms'] = cache::get('pm_unreadcount_' . $mod['id'])) === false) {
$query = prepare('SELECT COUNT(*) FROM ``pms`` WHERE `to` = :id AND `unread` = 1'); $query = prepare('SELECT COUNT(*) FROM ``pms`` WHERE `to` = :id AND `unread` = 1');
$query->bindValue(':id', $mod['id']); $query->bindValue(':id', $mod['id']);
$query->execute() or error(db_error($query)); $query->execute() or error(db_error($query));