[10.0.77.dev] Import v10, nettoyage des anciens dossiers de langues
This commit is contained in:
parent
89f2231026
commit
1c10eca976
@ -31,7 +31,7 @@ class common {
|
|||||||
const TEMP_DIR = 'site/tmp/';
|
const TEMP_DIR = 'site/tmp/';
|
||||||
|
|
||||||
// Numéro de version
|
// Numéro de version
|
||||||
const ZWII_VERSION = '10.0.75.dev';
|
const ZWII_VERSION = '10.0.77.dev';
|
||||||
|
|
||||||
public static $actions = [];
|
public static $actions = [];
|
||||||
public static $coreModuleIds = [
|
public static $coreModuleIds = [
|
||||||
|
@ -309,6 +309,16 @@ class config extends common {
|
|||||||
if ($this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true ) {
|
if ($this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true ) {
|
||||||
$users = $this->getData(['user']);
|
$users = $this->getData(['user']);
|
||||||
}
|
}
|
||||||
|
// Nettoyage des dossiers de langue
|
||||||
|
foreach (self::$i18nList as $itemKey => $item) {
|
||||||
|
// Le dossier existe ?
|
||||||
|
if (is_dir(self::DATA_DIR . $itemKey) === true) {
|
||||||
|
unlink (self::DATA_DIR . $itemKey . '/module.json');
|
||||||
|
unlink (self::DATA_DIR . $itemKey . '/page.json');
|
||||||
|
rmdir (self::DATA_DIR . $itemKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else { // Version invalide
|
} else { // Version invalide
|
||||||
// Valeurs en sortie erreur
|
// Valeurs en sortie erreur
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user