From ead2bf8fb0cd9de4b3e4a4108eca6d8668a4e7cd Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 13 Mar 2016 22:27:47 +0100 Subject: [PATCH] Db: show pending deployments when never deployed --- library/Director/Db.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Director/Db.php b/library/Director/Db.php index 01b8c7bd..b2eaef4e 100644 --- a/library/Director/Db.php +++ b/library/Director/Db.php @@ -30,13 +30,13 @@ class Db extends DbConnection { $db = $this->db(); - $query = 'SELECT COUNT(*) FROM director_activity_log WHERE id > (' + $query = 'SELECT COUNT(*) FROM director_activity_log WHERE id > COALESCE((' . ' SELECT id FROM director_activity_log WHERE checksum = (' . ' SELECT last_activity_checksum FROM director_generated_config WHERE checksum = (' . ' SELECT config_checksum FROM director_deployment_log ORDER by id desc limit 1' . ' )' . ' )' - . ')'; + . '), 0)'; if ($object !== null) { $query .= $db->quoteInto(' AND object_type = ?', $object->getTableName());