Merged in bugfix/HOR-4232 (pull request #6286)
HOR-4232 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
6d12229fa3
@@ -157,6 +157,11 @@ function run_upgrade($command, $args)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Verify the information of the singleton ServConf by changing the name of the class if is required.
|
||||||
|
CLI::logging("\nCheck/Fix serialized instance in serverConf.singleton file\n\n");
|
||||||
|
$serverConf = ServerConf::getSingleton();
|
||||||
|
$serverConf->updateClassNameInFile();
|
||||||
|
|
||||||
// SAVE Upgrades/Patches
|
// SAVE Upgrades/Patches
|
||||||
$arrayPatch = glob(PATH_TRUNK . 'patch-*');
|
$arrayPatch = glob(PATH_TRUNK . 'patch-*');
|
||||||
|
|
||||||
|
|||||||
@@ -484,4 +484,17 @@ class ServerConf
|
|||||||
$lang = substr($lang, 0, 2);
|
$lang = substr($lang, 0, 2);
|
||||||
return in_array($lang, $this->rtlLang);
|
return in_array($lang, $this->rtlLang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change class name from "serverConf" to "ServerConf" for previous versions to 3.2.2
|
||||||
|
*/
|
||||||
|
public function updateClassNameInFile()
|
||||||
|
{
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user