From ef08a4df2c97328ed8920a37a9052aaa3cb46f00 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Mena Date: Wed, 10 Jan 2018 16:41:12 -0400 Subject: [PATCH] HOR-4232 After the upgrade to version 3.2.2 the login is seen with the classic skin - Add verify integrity singleton servConf --- workflow/engine/bin/tasks/cliUpgrade.php | 5 +++++ workflow/engine/classes/ServerConf.php | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/workflow/engine/bin/tasks/cliUpgrade.php b/workflow/engine/bin/tasks/cliUpgrade.php index bfc449763..2a8040840 100644 --- a/workflow/engine/bin/tasks/cliUpgrade.php +++ b/workflow/engine/bin/tasks/cliUpgrade.php @@ -157,6 +157,11 @@ function run_upgrade($command, $args) } } + //Verify information singleton ServConf by change name of class. + CLI::logging("\nCheck serverConf.singleton integrity\n\n"); + $serverConf = ServerConf::getSingleton(); + $serverConf->syncronizeNameProperties(); + // SAVE Upgrades/Patches $arrayPatch = glob(PATH_TRUNK . 'patch-*'); diff --git a/workflow/engine/classes/ServerConf.php b/workflow/engine/classes/ServerConf.php index a5cb68e6b..a42d9c357 100644 --- a/workflow/engine/classes/ServerConf.php +++ b/workflow/engine/classes/ServerConf.php @@ -484,4 +484,17 @@ class ServerConf $lang = substr($lang, 0, 2); return in_array($lang, $this->rtlLang); } + + /** + * Change name class of serverConf to ServerConf for version minors to 3.2.2 + */ + public function syncronizeNameProperties() + { + if (file_exists(self::$instance->filePath) && filesize(self::$instance->filePath) > 0) { + $file = file_get_contents(self::$instance->filePath); + $file = str_replace('serverConf', self::class, $file); + self::$instance->unSerializeInstance($file); + $this->saveSingleton(); + } + } }