Skip to content

Commit

Permalink
fix db_prefix not working (fossar#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
niol committed Jul 15, 2015
1 parent cf4bddf commit 8380454
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion daos/mysql/Items.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,11 @@ public function numberOfUnread() {
* @return array mount of total, unread, starred entries in database
*/
public function stats() {
$res = \F3::get('db')->exec('SELECT COUNT(*) AS total, '.$this->stmt->sumBool('unread').' AS unread, '.$this->stmt->sumBool('starred').' AS starred FROM items;');
$res = \F3::get('db')->exec('SELECT
COUNT(*) AS total,
'.$this->stmt->sumBool('unread').' AS unread,
'.$this->stmt->sumBool('starred').' AS starred
FROM '.\F3::get('db_prefix').'items;');
return $res[0];
}
}

0 comments on commit 8380454

Please sign in to comment.