12201 bug langues
This commit is contained in:
parent
3f2733c033
commit
58ba7af79c
|
@ -1,8 +1,10 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## Version 12.2.01
|
## Version 12.2.01
|
||||||
### Améliorations :
|
### Correction :
|
||||||
- Gère les erreurs d'écritures à l'aide dun contrôle des données écrites sur le disque. Cinq tentatives se terminent par un arrêt en cas d'impossibilité d'enregistrer les données.
|
- Bug majeur lors de l'installation d'une version fraiche, erreur lors de la création de la base de données des langues.
|
||||||
|
### Amélioration :
|
||||||
|
- Gestion des erreurs d'écritures à l'aide dun contrôle des données écrites sur le disque. Cinq tentatives se terminent par un arrêt en cas d'impossibilité d'enregistrer les données.
|
||||||
|
|
||||||
## Version 12.2.00
|
## Version 12.2.00
|
||||||
### Nouveautés :
|
### Nouveautés :
|
||||||
|
|
|
@ -52,7 +52,7 @@ class common
|
||||||
// URL langues de l'UI en ligne
|
// URL langues de l'UI en ligne
|
||||||
const ZWII_UI_URL = 'https://forge.chapril.org/ZwiiCMS-Team/zwiicms-translations/raw/branch/master/';
|
const ZWII_UI_URL = 'https://forge.chapril.org/ZwiiCMS-Team/zwiicms-translations/raw/branch/master/';
|
||||||
|
|
||||||
// Numéro de version et branche pour l'autoupdate
|
// Numéro de version et branche pour l'auto-update
|
||||||
const ZWII_VERSION = '12.2.01';
|
const ZWII_VERSION = '12.2.01';
|
||||||
const ZWII_UPDATE_CHANNEL = "v12";
|
const ZWII_UPDATE_CHANNEL = "v12";
|
||||||
|
|
||||||
|
@ -110,7 +110,8 @@ class common
|
||||||
'showPageContent' => false,
|
'showPageContent' => false,
|
||||||
'state' => false,
|
'state' => false,
|
||||||
'style' => '',
|
'style' => '',
|
||||||
'title' => null, // Null car un titre peut être vide
|
'title' => null,
|
||||||
|
// Null car un titre peut être vide
|
||||||
// Trié par ordre d'exécution
|
// Trié par ordre d'exécution
|
||||||
'vendor' => [
|
'vendor' => [
|
||||||
'jquery',
|
'jquery',
|
||||||
|
@ -351,7 +352,8 @@ class common
|
||||||
'name' => $keys . '.json',
|
'name' => $keys . '.json',
|
||||||
'dir' => $this->dataPath($keys, self::$i18nContent),
|
'dir' => $this->dataPath($keys, self::$i18nContent),
|
||||||
'backup' => file_exists('site/data/.backup')
|
'backup' => file_exists('site/data/.backup')
|
||||||
]);;
|
]);
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Installation fraîche, initialisation des modules manquants
|
// Installation fraîche, initialisation des modules manquants
|
||||||
|
@ -471,7 +473,8 @@ class common
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mise à jour des données core
|
// Mise à jour des données core
|
||||||
if ($this->getData(['core', 'dataVersion']) !== intval(str_replace('.', '', self::ZWII_VERSION))) include('core/include/update.inc.php');
|
if ($this->getData(['core', 'dataVersion']) !== intval(str_replace('.', '', self::ZWII_VERSION)))
|
||||||
|
include('core/include/update.inc.php');
|
||||||
|
|
||||||
// Données de proxy
|
// Données de proxy
|
||||||
$proxy = $this->getData(['config', 'proxyType']) . $this->getData(['config', 'proxyUrl']) . ':' . $this->getData(['config', 'proxyPort']);
|
$proxy = $this->getData(['config', 'proxyType']) . $this->getData(['config', 'proxyUrl']) . ':' . $this->getData(['config', 'proxyPort']);
|
||||||
|
@ -664,6 +667,14 @@ class common
|
||||||
public function initData($module, $lang, $sampleSite = false)
|
public function initData($module, $lang, $sampleSite = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Créer la base de données des langues
|
||||||
|
if ($module === 'languages') {
|
||||||
|
copy('core/module/install/ressource/i18n/languages.json', self::DATA_DIR . 'languages.json');
|
||||||
|
$this->copyDir('core/module/install/ressource/i18n', self::I18N_DIR);
|
||||||
|
unlink(self::I18N_DIR . 'languages.json');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Tableau avec les données vierges
|
// Tableau avec les données vierges
|
||||||
require_once('core/module/install/ressource/defaultdata.php');
|
require_once('core/module/install/ressource/defaultdata.php');
|
||||||
|
|
||||||
|
@ -680,14 +691,6 @@ class common
|
||||||
}
|
}
|
||||||
$db->save;
|
$db->save;
|
||||||
|
|
||||||
|
|
||||||
// Créer la base de données des langues
|
|
||||||
if ($module === 'languages') {
|
|
||||||
copy('core/module/install/ressource/i18n/languages.json', self::DATA_DIR . 'languages.json');
|
|
||||||
$this->copyDir('core/module/install/ressource/i18n', self::I18N_DIR);
|
|
||||||
unlink(self::I18N_DIR . 'languages.json');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Créer le jeu de pages du site de test
|
// Créer le jeu de pages du site de test
|
||||||
if ($module === 'page') {
|
if ($module === 'page') {
|
||||||
$langFolder = $lang . '/content/';
|
$langFolder = $lang . '/content/';
|
||||||
|
@ -1193,8 +1196,10 @@ class common
|
||||||
public function removeDir($path)
|
public function removeDir($path)
|
||||||
{
|
{
|
||||||
foreach (new DirectoryIterator($path) as $item) {
|
foreach (new DirectoryIterator($path) as $item) {
|
||||||
if ($item->isFile()) @unlink($item->getRealPath());
|
if ($item->isFile())
|
||||||
if (!$item->isDot() && $item->isDir()) $this->removeDir($item->getRealPath());
|
@unlink($item->getRealPath());
|
||||||
|
if (!$item->isDot() && $item->isDir())
|
||||||
|
$this->removeDir($item->getRealPath());
|
||||||
}
|
}
|
||||||
return (rmdir($path));
|
return (rmdir($path));
|
||||||
}
|
}
|
||||||
|
@ -1367,8 +1372,10 @@ class common
|
||||||
}
|
}
|
||||||
// Page pleine pour la configuration des modules et l'édition des pages sauf l'affichage d'un article de blog
|
// Page pleine pour la configuration des modules et l'édition des pages sauf l'affichage d'un article de blog
|
||||||
$pattern = ['config', 'edit', 'add', 'comment', 'data'];
|
$pattern = ['config', 'edit', 'add', 'comment', 'data'];
|
||||||
if ((sizeof($blocks) === 1 ||
|
if (
|
||||||
in_array($this->getUrl(1), $pattern))) { // Pleine page en mode configuration
|
(sizeof($blocks) === 1 ||
|
||||||
|
in_array($this->getUrl(1), $pattern))
|
||||||
|
) { // Pleine page en mode configuration
|
||||||
$this->showContent();
|
$this->showContent();
|
||||||
} else {
|
} else {
|
||||||
echo '<div class="row siteContainer">';
|
echo '<div class="row siteContainer">';
|
||||||
|
@ -1824,7 +1831,8 @@ class common
|
||||||
// Mise en page de l'item
|
// Mise en page de l'item
|
||||||
$items .= '<li id="' . $parentPageId . '">';
|
$items .= '<li id="' . $parentPageId . '">';
|
||||||
|
|
||||||
if (($this->getData(['page', $parentPageId, 'disable']) === true
|
if (
|
||||||
|
($this->getData(['page', $parentPageId, 'disable']) === true
|
||||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||||
) or ($this->getData(['page', $parentPageId, 'disable']) === true
|
) or ($this->getData(['page', $parentPageId, 'disable']) === true
|
||||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||||
|
@ -1889,7 +1897,8 @@ class common
|
||||||
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
|
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
|
||||||
// Mise en page du sous-item
|
// Mise en page du sous-item
|
||||||
$items .= '<li id=' . $childKey . '>';
|
$items .= '<li id=' . $childKey . '>';
|
||||||
if (($this->getData(['page', $childKey, 'disable']) === true
|
if (
|
||||||
|
($this->getData(['page', $childKey, 'disable']) === true
|
||||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||||
) or ($this->getData(['page', $childKey, 'disable']) === true
|
) or ($this->getData(['page', $childKey, 'disable']) === true
|
||||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||||
|
@ -2098,7 +2107,8 @@ class common
|
||||||
}
|
}
|
||||||
if (common::$coreNotices) {
|
if (common::$coreNotices) {
|
||||||
$notification = 'Données absentes, restauration de <p> | ';
|
$notification = 'Données absentes, restauration de <p> | ';
|
||||||
foreach (common::$coreNotices as $item) $notification .= $item . ' | ';
|
foreach (common::$coreNotices as $item)
|
||||||
|
$notification .= $item . ' | ';
|
||||||
$notificationClass = 'notificationError';
|
$notificationClass = 'notificationError';
|
||||||
} elseif (empty($_SESSION['ZWII_NOTIFICATION_SUCCESS']) === false) {
|
} elseif (empty($_SESSION['ZWII_NOTIFICATION_SUCCESS']) === false) {
|
||||||
$notification = $_SESSION['ZWII_NOTIFICATION_SUCCESS'];
|
$notification = $_SESSION['ZWII_NOTIFICATION_SUCCESS'];
|
||||||
|
@ -2918,7 +2928,8 @@ class core extends common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Empêcher l'accès aux pages désactivées par URL directe
|
// Empêcher l'accès aux pages désactivées par URL directe
|
||||||
if (($this->getData(['page', $this->getUrl(0), 'disable']) === true
|
if (
|
||||||
|
($this->getData(['page', $this->getUrl(0), 'disable']) === true
|
||||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||||
) or ($this->getData(['page', $this->getUrl(0), 'disable']) === true
|
) or ($this->getData(['page', $this->getUrl(0), 'disable']) === true
|
||||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||||
|
@ -3256,7 +3267,8 @@ class core extends common
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'metaDescription' => $this->getData(['locale', 'metaDescription'])
|
'metaDescription' => $this->getData(['locale', 'metaDescription'])
|
||||||
]);
|
]);
|
||||||
};
|
}
|
||||||
|
;
|
||||||
switch ($this->output['display']) {
|
switch ($this->output['display']) {
|
||||||
// Layout brut
|
// Layout brut
|
||||||
case self::DISPLAY_RAW:
|
case self::DISPLAY_RAW:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"languages": {
|
||||||
"fr_FR": {
|
"fr_FR": {
|
||||||
"version": "3",
|
"version": "3",
|
||||||
"date": 1674298800
|
"date": 1674298800
|
||||||
|
@ -24,3 +25,4 @@
|
||||||
"date": 1674298800
|
"date": 1674298800
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue