Use Pluf_SQL instead of raw SQL, the latter caused problems on installations with table prefixes.

release-1.1
Thomas Keller 2011-03-16 20:58:13 +01:00
parent 603188f6ce
commit b75884c57e
1 changed files with 3 additions and 4 deletions

View File

@ -377,10 +377,9 @@ class IDF_Views
$forgestats['projects'] = count($projects);
// Count members
$db =& Pluf::db();
$sql = "SELECT count(id) as nb FROM indefero_users WHERE first_name != '---'";
$ret = $db->select ($sql);
$forgestats['members'] = $ret[0]['nb'];
$sql = new Pluf_SQL('first_name != %s', array('---'));
$forgestats['members'] = Pluf::factory('Pluf_User')
->getCount(array('filter' => $sql->gen()));
return $forgestats;
}