From 22c344dac82dd1c58fc8bb5b5a987893c13a4271 Mon Sep 17 00:00:00 2001 From: Joel Bout Date: Tue, 24 Dec 2019 16:39:23 +0100 Subject: [PATCH 1/3] Ensure unique SM init --- common/oatbox/install/Installer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/oatbox/install/Installer.php b/common/oatbox/install/Installer.php index 4ef167098..58229ec27 100755 --- a/common/oatbox/install/Installer.php +++ b/common/oatbox/install/Installer.php @@ -72,8 +72,10 @@ public function setupServiceManager($configPath) 'dir' => $configPath, 'humanReadable' => true )); + $sm = new ServiceManager($configService); + ServiceManager::setServiceManager($sm); - $this->setServiceManager(new ServiceManager($configService)); + $this->setServiceLocator($sm); } return $this->getServiceManager(); From f1d61a57a5f2959e3dd52c767712117d9bea7393 Mon Sep 17 00:00:00 2001 From: Joel Bout Date: Tue, 24 Dec 2019 16:40:22 +0100 Subject: [PATCH 2/3] Allow db aggregator services --- common/persistence/sql/SetupDb.php | 5 +---- helpers/class.File.php | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/common/persistence/sql/SetupDb.php b/common/persistence/sql/SetupDb.php index 626cd6c9d..6e51eec31 100644 --- a/common/persistence/sql/SetupDb.php +++ b/common/persistence/sql/SetupDb.php @@ -41,10 +41,7 @@ class SetupDb implements LoggerAwareInterface public function setupDatabase(\common_persistence_SqlPersistence $p) { $dbalDriver = $p->getDriver(); - if (!$dbalDriver instanceof \common_persistence_sql_dbal_Driver) { - throw new \common_exception_InconsistentData('Non DBAL driver no longer supported'); - } - $dbName = $dbalDriver->getDataBase(); + $dbName = $dbalDriver->getDbalConnection()->getDatabase(); $this->verifyDatabase($p, $dbName); $this->cleanDb($p); $this->setupTables($p); diff --git a/helpers/class.File.php b/helpers/class.File.php index a4f46dec4..31870bee6 100644 --- a/helpers/class.File.php +++ b/helpers/class.File.php @@ -170,7 +170,7 @@ static public function emptyDirectory($path, $ignoreSystemFiles = false) continue; } - $success = self::remove($path . DIRECTORY_SEPARATOR . $entry) ? $success : false; + $success = self::remove($path . DIRECTORY_SEPARATOR . $entry) && $success; } } closedir($handle); From aa56ac33a47a7cff54a205edd2a06ebe3e15f255 Mon Sep 17 00:00:00 2001 From: Joel Bout Date: Tue, 24 Dec 2019 16:41:12 +0100 Subject: [PATCH 3/3] Bump v12.5.7 --- manifest.php | 2 +- scripts/update/Updater.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.php b/manifest.php index cf882a454..06583cce4 100755 --- a/manifest.php +++ b/manifest.php @@ -32,7 +32,7 @@ 'label' => 'Generis Core', 'description' => 'Core extension, provide the low level framework and an API to manage ontologies', 'license' => 'GPL-2.0', - 'version' => '12.5.6', + 'version' => '12.5.7', 'author' => 'Open Assessment Technologies, CRP Henri Tudor', 'requires' => array(), 'models' => array( diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php index 710400eab..77c944d76 100644 --- a/scripts/update/Updater.php +++ b/scripts/update/Updater.php @@ -475,6 +475,6 @@ public function update($initialVersion) } $this->setVersion('12.4.1'); } - $this->skip('12.4.1', '12.5.6'); + $this->skip('12.4.1', '12.5.7'); } }