From 92104411782db78ae5ca12b5fe5572016ed5681a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 28 Jun 2016 12:11:13 +0200 Subject: [PATCH] DirectorActivityLog: fix loadLatest() --- library/Director/Objects/DirectorActivityLog.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Director/Objects/DirectorActivityLog.php b/library/Director/Objects/DirectorActivityLog.php index bfabc88c..b877d086 100644 --- a/library/Director/Objects/DirectorActivityLog.php +++ b/library/Director/Objects/DirectorActivityLog.php @@ -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)