diff --git a/CHANGES.md b/CHANGES.md index 6098def9..8b107a6e 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ ## Version 12.1.00 ### Corrections : +- Corrige un problème de prise en compte des scripts et des feuilles de style intégrés à la page ou au site. - Corrige une erreur fatale avec un argument float au lieu d'int dans mt_srand. ### Améliorations : - Changement du nom de formulaire de gestion des langues (multilangue devient multilingue). diff --git a/core/core.php b/core/core.php index 14abefbe..b42c0b2f 100644 --- a/core/core.php +++ b/core/core.php @@ -2999,8 +2999,8 @@ class core extends common 'title' => $title, 'content' => $this->getPage($this->getUrl(0), self::$i18nContent) . // Concatène avec les paramètres avancés. - '' . - '', + $this->getData(['page', $this->getUrl(0), 'css']) . + $this->getData(['page', $this->getUrl(0), 'js']), 'metaDescription' => $this->getData(['page', $this->getUrl(0), 'metaDescription']), 'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']), 'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']), @@ -3008,13 +3008,13 @@ class core extends common 'disable' => $this->getData(['page', $this->getUrl(0), 'disable']), 'contentRight' => $this->getData(['page', $this->getUrl(0), 'barRight']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$i18nContent) . - '' . - '' + $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']) . + $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']) : '', 'contentLeft' => $this->getData(['page', $this->getUrl(0), 'barLeft']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$i18nContent) . - '' . - '' + $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']) . + $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']) : '' ]); } diff --git a/core/layout/main.php b/core/layout/main.php index 64920ab8..c14fee76 100644 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -24,9 +24,7 @@ showStyle(); ?> '; include(self::DATA_DIR . 'head.inc.html'); - echo ''; } ?> @@ -194,9 +192,7 @@ showScript(); ?> '; include(self::DATA_DIR . 'body.inc.html'); - echo ''; }?> diff --git a/core/module/page/page.php b/core/module/page/page.php index 65acfa33..dae6717b 100644 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -564,8 +564,6 @@ class page extends common if ($this->isPost()) { // Supprime les balises styles si elles ont été saisies $css = $this->getInput('pageCssEditorContent', null); - $css = str_replace('', '', $css); // Enregistre le CSS $this->setData([ 'page', $this->getUrl(2), 'css', @@ -594,11 +592,9 @@ class page extends common public function jsEditor() { // Soumission du formulaire - // Supprime les balises scripts si elles ont été saisies - $js = $this->getInput('pageJsEditorContent', null); - $js = str_replace('', '', $js); if ($this->isPost()) { + // Supprime les balises scripts si elles ont été saisies + $js = $this->getInput('pageJsEditorContent', null); // Enregistre le JS $this->setData([ 'page', $this->getUrl(2), 'js', diff --git a/core/module/page/view/cssEditor/cssEditor.php b/core/module/page/view/cssEditor/cssEditor.php index 48bd27c7..b9c62aeb 100644 --- a/core/module/page/view/cssEditor/cssEditor.php +++ b/core/module/page/view/cssEditor/cssEditor.php @@ -14,7 +14,7 @@
empty($this->getData(['page', $this->getUrl(2), 'css'])) ? '' : $this->getData(['page', $this->getUrl(2), 'css']), + 'value' => is_null($this->getData(['page', $this->getUrl(2), 'css'])) ? '' : $this->getData(['page', $this->getUrl(2), 'css']), 'class' => 'editor' ]); ?>
diff --git a/core/module/page/view/jsEditor/jsEditor.php b/core/module/page/view/jsEditor/jsEditor.php index 6e1cee1b..a14f2693 100644 --- a/core/module/page/view/jsEditor/jsEditor.php +++ b/core/module/page/view/jsEditor/jsEditor.php @@ -14,7 +14,7 @@
empty($this->getData(['page', $this->getUrl(2), 'js'])) ? '' : $this->getData(['page', $this->getUrl(2), 'js']), + 'value' => is_null($this->getData(['page', $this->getUrl(2), 'js'])) ? '' : $this->getData(['page', $this->getUrl(2), 'js']), 'class' => 'editor' ]); ?>