diff --git a/core/core.php b/core/core.php
index 173bb27a..7154985a 100755
--- a/core/core.php
+++ b/core/core.php
@@ -253,7 +253,7 @@ class common {
* - L'auto-détection est active
*/
- if ( $this->getData(['config', 'i18n', 'active']) === true
+ if ( $this->getData(['config', 'i18n', 'enable']) === true
AND $this->getData(['config', 'i18n','scriptGoogle']) === true
AND $this->getData(['config', 'i18n','autoDetect']) === true
AND $this->getInput('ZWII_I18N_SITE') !== ''
@@ -1179,7 +1179,7 @@ class common {
* @param Page par défaut
*/
public function showContent() {
- if ($this->getData(['config', 'i18n', 'active']) === true) {
+ if ($this->getData(['config', 'i18n', 'enable']) === true) {
echo $this->showi18n('Site');
}
if(
@@ -1200,7 +1200,7 @@ class common {
* La traduction est active et le site n'est pas en français.
* La fonction est activée.
*/
- if ( $this->getData(['config', 'i18n', 'active']) === true
+ if ( $this->getData(['config', 'i18n', 'enable']) === true
AND $this->getData(['config', 'i18n','scriptGoogle']) === true
AND $this->getData(['config', 'i18n','showCredits']) === true
AND
@@ -1566,7 +1566,7 @@ class common {
}
// Retourne les items du menu
echo '
';
- if ($this->getData(['config', 'i18n', 'active']) === true) {
+ if ($this->getData(['config', 'i18n', 'enable']) === true) {
echo $this->showi18n('Nav');
}
}
@@ -1808,7 +1808,7 @@ class common {
$rightItems .= '' . template::ico('folder') . '';
}
if($this->getUser('group') >= self::GROUP_ADMIN) {
- if ($this->getData(['config', 'i18n', 'active']) === true) {
+ if ($this->getData(['config', 'i18n', 'enable']) === true) {
$rightItems .= '' . template::ico('flag') . '';
}
$rightItems .= '' . template::ico('brush') . '';
@@ -2586,7 +2586,7 @@ class core extends common {
// Chargement de la bibliothèque googtrans
// Le script de traduction est sélectionné
- if ($this->getData(['config', 'i18n', 'active']) === true) {
+ if ($this->getData(['config', 'i18n', 'enable']) === true) {
if ( $this->getData(['config', 'i18n','scriptGoogle']) === true
// et la traduction de la langue courante est automatique
AND ( $this->getInput('ZWII_I18N_SCRIPT') !== ''
diff --git a/core/include/update.inc.php b/core/include/update.inc.php
index 2951b567..1a707cdf 100644
--- a/core/include/update.inc.php
+++ b/core/include/update.inc.php
@@ -595,7 +595,7 @@ if ($this->getData(['core', 'dataVersion']) < 11000) {
$this->setData(['config','autoDisconnect',true]);
// Mettre à jour les données de langue
- $this->setData(['config', 'i18n','active', true ]);
+ $this->setData(['config', 'i18n', 'enable', true ]);
$this->setData(['config', 'i18n','scriptGoogle', false ]);
$this->setData(['config', 'i18n','showCredits', false ]);
$this->setData(['config', 'i18n','autoDetect', false ]);
@@ -642,4 +642,15 @@ if ($this->getData(['core', 'dataVersion']) < 11000) {
$this->setData(['config','seo','robots',true]);
$this->setData(['core', 'dataVersion', 11000]);
+}
+
+// Version 11.0.10
+if ($this->getData(['core', 'dataVersion']) < 11010) {
+
+ // Renommer une variable
+ $data = $this->getData(['config', 'i18n', 'active']);
+ $this->deleteData(['config', 'i18n', 'active']);
+ $this->setData(['config', 'i18n', 'enable', $data ]);
+
+ $this->setData(['core', 'dataVersion', 11010]);
}
\ No newline at end of file
diff --git a/core/module/config/config.php b/core/module/config/config.php
index a521d68f..edf8547d 100644
--- a/core/module/config/config.php
+++ b/core/module/config/config.php
@@ -412,7 +412,7 @@ class config extends common {
'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true)
]
]);
- $this->setData(['config', 'i18n', 'active', $this->getInput('configI18n',helper::FILTER_BOOLEAN) ]);
+ $this->setData(['config', 'i18n', 'enable', $this->getInput('configI18n',helper::FILTER_BOOLEAN) ]);
// Générer robots.txt et sitemap
$this->generateFiles();
// Valeurs en sortie
@@ -495,7 +495,7 @@ class config extends common {
'captcha' => $this->getInput('configAdvancedConnectCaptcha',helper::FILTER_BOOLEAN),
],
'i18n' => [
- 'active' => $this->getData(['config', 'i18n', 'active'])
+ 'enable' => $this->getData(['config', 'i18n', 'enable'])
]
]
]);
diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php
index 332d4b78..24471a96 100644
--- a/core/module/config/view/index/index.php
+++ b/core/module/config/view/index/index.php
@@ -69,7 +69,7 @@
$this->getData(['config', 'i18n', 'active']),
+ 'checked' => $this->getData(['config', 'i18n', 'enable']),
'help'=> 'Une nouvelle icône apparaîtra dans la barre d\'administration. Consultez l\'aide de la page concernée pour en apprendre plus.'
]); ?>
diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php
index f717a8de..f5a66f3e 100644
--- a/core/module/install/ressource/defaultdata.php
+++ b/core/module/install/ressource/defaultdata.php
@@ -37,7 +37,7 @@ class init extends common {
'captcha' => true
],
"i18n" => [
- "active"=> true,
+ "enable"=> true,
"scriptGoogle"=> false,
"showCredits"=> false,
"autoDetect"=> false,
@@ -52,7 +52,7 @@ class init extends common {
]
],
'core' => [
- 'dataVersion' => 11000,
+ 'dataVersion' => 11010,
'lastBackup' => 0,
'lastClearTmp' => 0,
'lastAutoUpdate' => 0,
diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php
index 4af1b63c..a4f31920 100644
--- a/core/module/translate/translate.php
+++ b/core/module/translate/translate.php
@@ -124,7 +124,7 @@ class translate extends common {
// Enregistrement des données
$this->setData(['config','i18n', [
- 'active' => $this->getData(['config', 'i18n', 'active']),
+ 'enable' => $this->getData(['config', 'i18n', 'enable']),
'scriptGoogle' => $script,
'showCredits' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) ? $this->getInput('translateCredits', helper::FILTER_BOOLEAN) : false,
'autoDetect' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) ? $this->getInput('translateAutoDetect', helper::FILTER_BOOLEAN) : false,