DirectorActivityLog: fix loadLatest()

This commit is contained in:
Thomas Gelf 2016-06-28 12:11:13 +02:00
parent 22c040e6c4
commit 9210441178
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ class DirectorActivityLog extends DbObject
public static function loadLatest(Db $connection)
{
$db = $connection->getDbAdapter();
$query = $db->select()->from($this->table, array('id' => 'MAX(id)'));
return static::load($db->fetchOne($query));
$query = $db->select()->from('director_activity_log', array('id' => 'MAX(id)'));
return static::load($db->fetchOne($query), $connection);
}
public static function logCreation(DbObject $object, Db $db)