From df31319e1ea5147b4da800f721d2ee1d088ba558 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Tue, 5 Sep 2023 21:14:04 +0200 Subject: [PATCH] Renomme i18nContent en classesContent --- core/class/layout.class.php | 2 +- core/class/router.class.php | 8 +- core/core.php | 14 +- core/layout/blank.php | 2 +- core/layout/light.php | 2 +- core/layout/mail.php | 2 +- core/layout/main.php | 2 +- core/module/language/language.php | 157 +------------------ core/module/language/view/index/index.js.php | 82 ++-------- core/module/language/view/index/index.php | 112 ++++--------- core/module/maintenance/maintenance.php | 2 +- core/module/page/page.php | 22 +-- core/module/page/view/edit/edit.php | 2 +- core/module/plugin/plugin.php | 6 +- module/search/search.php | 8 +- 15 files changed, 78 insertions(+), 345 deletions(-) diff --git a/core/class/layout.class.php b/core/class/layout.class.php index 5fbf3bf..0c5add7 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -913,7 +913,7 @@ class layout extends common if (is_dir(self::DATA_DIR . $key)) { $c++; $location = helper::baseUrl() . 'language/content/' . $key; - $leftItem .= ''; + $leftItem .= ''; } } if ($c > 1) { diff --git a/core/class/router.class.php b/core/class/router.class.php index 8e68dec..93dade3 100644 --- a/core/class/router.class.php +++ b/core/class/router.class.php @@ -611,10 +611,10 @@ class core extends common $inlineScript[] = $this->getData(['page', $this->getUrl(0), 'js']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'js']); // Importe le contenu, le CSS et le script des barres - $contentRight = $this->getData(['page', $this->getUrl(0), 'barRight']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$i18nContent) : ''; + $contentRight = $this->getData(['page', $this->getUrl(0), 'barRight']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$classesContent) : ''; $inlineStyle[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']); $inlineScript[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']) === null ? '' : $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) : ''; + $contentLeft = $this->getData(['page', $this->getUrl(0), 'barLeft']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$classesContent) : ''; $inlineStyle[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']); $inlineScript[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']); @@ -632,7 +632,7 @@ class core extends common $this->addOutput([ 'title' => $title, - 'content' => $this->getPage($this->getUrl(0), self::$i18nContent), + 'content' => $this->getPage($this->getUrl(0), self::$classesContent), 'metaDescription' => $this->getData(['page', $this->getUrl(0), 'metaDescription']), 'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']), 'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']), @@ -658,7 +658,7 @@ class core extends common : $this->getData(['page', $this->getUrl(0), 'metaDescription']); // Importe le CSS de la page principale - $pageContent = $this->getPage($this->getUrl(0), self::$i18nContent); + $pageContent = $this->getPage($this->getUrl(0), self::$classesContent); $this->addOutput([ 'title' => $title, diff --git a/core/core.php b/core/core.php index 38ff309..4a3854d 100644 --- a/core/core.php +++ b/core/core.php @@ -170,7 +170,7 @@ class common // Langue de l'interface sélectionnée public static $i18nUI = 'fr_FR'; // Langues de contenu - public static $i18nContent = 'fr_FR'; + public static $classesContent = 'fr_FR'; public static $languages = [ 'az_AZ' => 'Azərbaycan dili', 'bg_BG' => 'български език', @@ -333,30 +333,30 @@ class common // Déterminer la langue du contenu du site if (isset($_SESSION['ZWII_CONTENT'])) { // Déterminé par la session présente - self::$i18nContent = $_SESSION['ZWII_CONTENT']; + self::$classesContent = $_SESSION['ZWII_CONTENT']; } else { // Détermine la langue par défaut foreach (self::$languages as $key => $value) { if (file_exists(self::DATA_DIR . $key . '/.default')) { - self::$i18nContent = $key; + self::$classesContent = $key; $_SESSION['ZWII_CONTENT'] = $key; break; } } } - \setlocale(LC_ALL, self::$i18nContent . '.UTF8'); + \setlocale(LC_ALL, self::$classesContent . '.UTF8'); // Instanciation de la classe des entrées / sorties - $this->jsonDB(self::$i18nContent); + $this->jsonDB(self::$classesContent); // Installation fraîche, initialisation des modules if ($this->user === []) { foreach ($this->dataFiles as $stageId => $item) { - $folder = $this->dataPath($stageId, self::$i18nContent); + $folder = $this->dataPath($stageId, self::$classesContent); if ( file_exists($folder . $stageId . '.json') === false ) { - $this->initData($stageId, self::$i18nContent); + $this->initData($stageId, self::$classesContent); common::$coreNotices[] = $stageId; } } diff --git a/core/layout/blank.php b/core/layout/blank.php index a8ca73c..d93bfcd 100644 --- a/core/layout/blank.php +++ b/core/layout/blank.php @@ -1,5 +1,5 @@ - + diff --git a/core/layout/light.php b/core/layout/light.php index 40d10dc..f24879a 100644 --- a/core/layout/light.php +++ b/core/layout/light.php @@ -1,5 +1,5 @@ - + diff --git a/core/layout/mail.php b/core/layout/mail.php index 4b8bbec..d14ef83 100644 --- a/core/layout/mail.php +++ b/core/layout/mail.php @@ -1,5 +1,5 @@ - + diff --git a/core/layout/main.php b/core/layout/main.php index 70a4bdb..46d3710 100644 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -1,5 +1,5 @@ - + diff --git a/core/module/language/language.php b/core/module/language/language.php index 4dcae1c..8611b40 100644 --- a/core/module/language/language.php +++ b/core/module/language/language.php @@ -41,8 +41,6 @@ class language extends common public static $translateOptions = []; // Page pour la configuration dans la langue - public static $pagesList = []; - public static $orphansList = []; public static $pages = ''; // Liste des langues installées @@ -183,52 +181,6 @@ class language extends common public function index() { - // -------------------------------------------------------------------------------------------------- - // Langues du site - // -------------------------------------------------------------------------------------------------- - - foreach (self::$languages as $key => $value) { - // tableau des langues installées - if (is_dir(self::DATA_DIR . $key)) { - if ( - file_exists(self::DATA_DIR . $key . '/page.json') && - file_exists(self::DATA_DIR . $key . '/module.json') && - file_exists(self::DATA_DIR . $key . '/locale.json') - ) { - if (file_exists(self::DATA_DIR . $key . '/.default')) { - $messageLocale = helper::translate('Langue par défaut'); - } elseif (isset($_SESSION['ZWII_CONTENT']) && $_SESSION['ZWII_CONTENT'] === $key) { - $messageLocale = helper::translate('Langue du site sélectionnée'); - } else { - $messageLocale = ''; - } - self::$languagesInstalled[] = [ - template::flag($key, '20 %') . ' ' . $value . ' (' . $key . ')', - $messageLocale, - template::button('translateContentLanguageLocaleEdit' . $key, [ - 'class' => file_exists(self::DATA_DIR . $key . '/locale.json') ? '' : ' disabled', - 'href' => helper::baseUrl() . $this->getUrl(0) . '/locale/' . $key, - 'value' => template::ico('pencil'), - 'help' => 'Éditer' - ]), - template::button('translateContentLanguageLocaleDelete' . $key, [ - 'class' => 'translateDelete buttonRed' . ($messageLocale ? ' disabled' : ''), - 'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/locale/' . $key, - 'value' => template::ico('trash'), - 'help' => 'Supprimer', - ]) - ]; - } - } - - } - // Activation du bouton de copie - self::$siteCopy = count(self::$languagesInstalled) > 1 ? false : true; - - // -------------------------------------------------------------------------------------------------- - // Langues de l'UI - // -------------------------------------------------------------------------------------------------- - // Langues attachées à des utilisateurs non effaçables $usersUI = []; $users = $this->getData(['user']); @@ -305,7 +257,7 @@ class language extends common // Valeurs en sortie $this->addOutput([ - 'title' => helper::translate('Langues'), + 'title' => helper::translate('Langues de l\'interface'), 'view' => 'index' ]); } @@ -361,113 +313,6 @@ class language extends common } - /** - * Edition des paramètres de la langue de contenu - */ - public function locale() - { - // Action interdite ou URl avec le code langue incorrecte - $lang = $this->getUrl(2); - if ( - array_key_exists($lang, self::$languages) === false - ) { - // Valeurs en sortie - $this->addOutput([ - 'redirect' => helper::baseUrl() . 'language', - 'state' => false, - 'notification' => helper::translate('Action interdite') - ]); - } - - // Soumission du formulaire - if ( - $this->getUser('permission', __CLASS__, __FUNCTION__) === true && - $this->isPost() - ) { - - // Sauvegarder les locales - $data = [ - 'config' => [ - 'homePageId' => $this->getInput('localeHomePageId', helper::FILTER_ID, true), - 'page404' => $this->getInput('localePage404'), - 'page403' => $this->getInput('localePage403'), - 'page302' => $this->getInput('localePage302'), - 'legalPageId' => $this->getInput('localeLegalPageId'), - 'searchPageId' => $this->getInput('localeSearchPageId'), - 'poweredPageLabel' => empty($this->getInput('localePoweredPageLabel', helper::FILTER_STRING_SHORT)) ? 'Motorisé par' : $this->getInput('localePoweredPageLabel', helper::FILTER_STRING_SHORT), - 'searchPageLabel' => empty($this->getInput('localeSearchPageLabel', helper::FILTER_STRING_SHORT)) ? 'Rechercher' : $this->getInput('localeSearchPageLabel', helper::FILTER_STRING_SHORT), - 'legalPageLabel' => empty($this->getInput('localeLegalPageLabel', helper::FILTER_STRING_SHORT)) ? 'Mentions légales' : $this->getInput('localeLegalPageLabel', helper::FILTER_STRING_SHORT), - 'sitemapPageLabel' => empty($this->getInput('localeSitemapPageLabel', helper::FILTER_STRING_SHORT)) ? 'Plan du site' : $this->getInput('localeSitemapPageLabel', helper::FILTER_STRING_SHORT), - 'metaDescription' => $this->getInput('localeMetaDescription', helper::FILTER_STRING_LONG, true), - 'title' => $this->getInput('localeTitle', helper::FILTER_STRING_SHORT, true), - 'cookies' => [ - // Les champs sont obligatoires si l'option consentement des cookies est active - 'mainLabel' => $this->getInput('localeCookiesZwiiText', helper::FILTER_STRING_LONG, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)), - 'titleLabel' => $this->getInput('localeCookiesTitleText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)), - 'linkLegalLabel' => $this->getInput('localeCookiesLinkMlText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)), - 'cookiesFooterText' => $this->getInput('localeCookiesFooterText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)), - 'buttonValidLabel' => $this->getInput('localeCookiesButtonText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)) - ] - ] - ]; - - // Sauvegarde hors méthodes si la langue n'est pas celle de l'UI - if ($lang === self::$i18nContent) { - // Enregistrer les données par lecture directe du formulaire - $this->setData(['config', $data['config']]); - } else { - // Sauver sur le disque - file_put_contents(self::DATA_DIR . $lang . '/locale.json', json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT), LOCK_EX); - } - - // Valeurs en sortie - $this->addOutput([ - 'redirect' => helper::baseUrl() . $this->getUrl(), - 'notification' => helper::translate('Modifications enregistrées'), - 'state' => true - ]); - } - - // Préparation de l'affichage du formulaire - //----------------------------------------- - - // La locale est-elle celle de la langue de l'UI ? - if ($lang === self::$i18nContent) { - self::$locales[$lang]['config'] = $this->getData(['config']); - } else { - // Lire les locales sans passer par les méthodes - self::$locales[$lang] = json_decode(file_get_contents(self::DATA_DIR . $lang . '/locale.json'), true); - } - - // Générer la liste des pages disponibles - self::$pagesList = $this->getData(['page']); - foreach (self::$pagesList as $page => $pageId) { - if ( - $this->getData(['page', $page, 'block']) === 'bar' || - $this->getData(['page', $page, 'disable']) === true - ) { - unset(self::$pagesList[$page]); - } - } - - self::$orphansList = $this->getData(['page']); - foreach (self::$orphansList as $page => $pageId) { - if ( - $this->getData(['page', $page, 'block']) === 'bar' || - $this->getData(['page', $page, 'disable']) === true || - $this->getdata(['page', $page, 'position']) !== 0 - ) { - unset(self::$orphansList[$page]); - } - } - - // Valeurs en sortie - $this->addOutput([ - 'title' => helper::translate('Paramètres de la localisation') . ' ' . template::flag($lang, '20 %'), - 'view' => 'config' - ]); - } - /** * Edition de la langue de l'interface */ diff --git a/core/module/language/view/index/index.js.php b/core/module/language/view/index/index.js.php index 01795c7..235748a 100644 --- a/core/module/language/view/index/index.js.php +++ b/core/module/language/view/index/index.js.php @@ -12,77 +12,17 @@ */ -$(document).ready(function() { - var translateLayout = getCookie("translateLayout"); - if (translateLayout == null) { - translateLayout = "content"; - setCookie("translateLayout", "content"); +$(document).ready(function () { - } - $("#contentContainer").hide(); - $("#uiContainer").hide(); - $("#" + translateLayout + "Container").show(); - $("#translate" + capitalizeFirstLetter(translateLayout) + "Button").addClass("activeButton"); - - -}); - -// Sélecteur de fonctions - -$("#translateUiButton").on("click", function() { - $("#contentContainer").hide(); - $("#uiContainer").show(); - $(this).addClass("activeButton"); - $("#translateContentButton").removeClass("activeButton"); - setCookie("translateLayout", "ui"); - -}); -$("#translateContentButton").on("click", function() { - $("#uiContainer").hide(); - $("#contentContainer").show(); - $(this).addClass("activeButton"); - $("#translateUiButton").removeClass("activeButton"); - setCookie("translateLayout", "content"); - // Afficher les boutons liés au contenu - $(".contentButtonContainer").show(); -}); - -/** - * Confirmation de suppression - */ -$(".translateDelete").on("click", function() { - var _this = $(this); - var message_delete = ""; - return core.confirm(message_delete, function() { - $(location).attr("href", _this.attr("href")); + /** + * Confirmation de suppression + */ + $(".translateDelete").on("click", function () { + var _this = $(this); + var message_delete = ""; + return core.confirm(message_delete, function () { + $(location).attr("href", _this.attr("href")); + }); }); + }); - - - -// Fonctions -function setCookie(name, value, days) { - var expires = ""; - if (days) { - var date = new Date(); - date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); - expires = "; expires=" + date.toUTCString(); - } - document.cookie = name + "=" + (value || "") + expires + "; path=/; samesite=lax"; -} - -function getCookie(name) { - var nameEQ = name + "="; - var ca = document.cookie.split(';'); - for (var i = 0; i < ca.length; i++) { - var c = ca[i]; - while (c.charAt(0) == ' ') c = c.substring(1, c.length); - if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); - } - return null; -} - -// Define function to capitalize the first letter of a string -function capitalizeFirstLetter(string) { - return string.charAt(0).toUpperCase() + string.slice(1); -} \ No newline at end of file diff --git a/core/module/language/view/index/index.php b/core/module/language/view/index/index.php index ca4c2cb..e817931 100644 --- a/core/module/language/view/index/index.php +++ b/core/module/language/view/index/index.php @@ -9,90 +9,38 @@
'https://doc.zwiicms.fr/prise-en-charge-des-langues-etrangeres', - 'target' => '_blank', - 'value' => template::ico('help'), - 'class' => 'buttonHelp', - 'help' => 'Consulter l\'aide en ligne' - ]);*/?> + 'href' => 'https://doc.zwiicms.fr/prise-en-charge-des-langues-etrangeres', + 'target' => '_blank', + 'value' => template::ico('help'), + 'class' => 'buttonHelp', + 'help' => 'Consulter l\'aide en ligne' + ]);*/?> +
+ +
+
+
+

+ +

+ + + +
+
+
+
+
+
+

+ +

+ + + +
-
- 'Interface', - 'class' => 'buttonTab' - ]); ?> - 'Site', - 'class' => 'buttonTab' - ]); ?> -
- -
-
-
-
-

- -

- - - -
-
-
-
-
-
-

- -

- - - -
-
-
-
-
-
-
-
-

- -

-
- helper::baseUrl() . 'language/copy', - 'ico' => 'docs', - 'disabled' => $module::$siteCopy, - 'value' => 'Copie de contenus localisés' - ]); ?> -
-
- helper::baseUrl() . 'language/add', - 'ico' => 'plus', - 'class' => 'buttonGreen', - 'value' => 'Nouveau contenu localisé' - ]); ?> -
-
-
-
-
-
-
-

- -

- - - -
-
-
-
\ No newline at end of file diff --git a/core/module/maintenance/maintenance.php b/core/module/maintenance/maintenance.php index 348f24a..a51ce6f 100644 --- a/core/module/maintenance/maintenance.php +++ b/core/module/maintenance/maintenance.php @@ -41,7 +41,7 @@ class maintenance extends common ? '' : $this->getData(['page', $this->getData(['config', 'page302']), 'title']), //'content' => $this->getdata(['page',$this->getData(['config','page302']),'content']), - 'content' => $this->getPage($this->getData(['config', 'page302']), self::$i18nContent), + 'content' => $this->getPage($this->getData(['config', 'page302']), self::$classesContent), 'view' => 'index' ]); } else { diff --git a/core/module/page/page.php b/core/module/page/page.php index 2d16395..c2b48e3 100644 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -174,11 +174,11 @@ class page extends common ] ]); // Creation du contenu de la page - if (!is_dir(self::DATA_DIR . self::$i18nContent . '/content')) { - mkdir(self::DATA_DIR . self::$i18nContent . '/content', 0755); + if (!is_dir(self::DATA_DIR . self::$classesContent . '/content')) { + mkdir(self::DATA_DIR . self::$classesContent . '/content', 0755); } - //file_put_contents(self::DATA_DIR . self::$i18nContent . '/content/' . $pageId . '.html', '

Contenu de votre nouvelle page.

'); - $this->setPage($pageId, '

Contenu de votre nouvelle page.

', self::$i18nContent); + //file_put_contents(self::DATA_DIR . self::$classesContent . '/content/' . $pageId . '.html', '

Contenu de votre nouvelle page.

'); + $this->setPage($pageId, '

Contenu de votre nouvelle page.

', self::$classesContent); // Met à jour le sitemap $this->updateSitemap(); @@ -279,8 +279,8 @@ class page extends common } // Effacer la page $this->deleteData(['page', $page]); - if (file_exists(self::DATA_DIR . self::$i18nContent . '/content/' . $page . '.html')) { - unlink(self::DATA_DIR . self::$i18nContent . '/content/' . $page . '.html'); + if (file_exists(self::DATA_DIR . self::$classesContent . '/content/' . $page . '.html')) { + unlink(self::DATA_DIR . self::$classesContent . '/content/' . $page . '.html'); } $this->deleteData(['module', $page]); @@ -369,8 +369,8 @@ class page extends common // Supprime l'ancienne page si l'id a changée if ($pageId !== $this->getUrl(2)) { $this->deleteData(['page', $this->getUrl(2)]); - if (file_exists(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getUrl(2) . '.html')) { - unlink(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getUrl(2) . '.html'); + if (file_exists(self::DATA_DIR . self::$classesContent . '/content/' . $this->getUrl(2) . '.html')) { + unlink(self::DATA_DIR . self::$classesContent . '/content/' . $this->getUrl(2) . '.html'); } } // Traitement des pages spéciales affectées dans la config : @@ -508,11 +508,11 @@ class page extends common ]); // Creation du contenu de la page - if (!is_dir(self::DATA_DIR . self::$i18nContent . '/content')) { - mkdir(self::DATA_DIR . self::$i18nContent . '/content', 0755); + if (!is_dir(self::DATA_DIR . self::$classesContent . '/content')) { + mkdir(self::DATA_DIR . self::$classesContent . '/content', 0755); } $content = empty($this->getInput('pageEditContent', null)) ? '

' : str_replace('

', '

 

', $this->getInput('pageEditContent', null)); - $this->setPage($pageId, $content, self::$i18nContent); + $this->setPage($pageId, $content, self::$classesContent); // Met à jour le sitemap $this->updateSitemap(); diff --git a/core/module/page/view/edit/edit.php b/core/module/page/view/edit/edit.php index e22f6ed..dbbd736 100644 --- a/core/module/page/view/edit/edit.php +++ b/core/module/page/view/edit/edit.php @@ -108,7 +108,7 @@
'editorWysiwyg', - 'value' => $this->getPage($this->getUrl(2), self::$i18nContent) + 'value' => $this->getPage($this->getUrl(2), self::$classesContent) ]); ?>
diff --git a/core/module/plugin/plugin.php b/core/module/plugin/plugin.php index 92e51c5..c9b9814 100644 --- a/core/module/plugin/plugin.php +++ b/core/module/plugin/plugin.php @@ -537,19 +537,19 @@ class plugin extends common $infoModules[$pagesInfos[$keyi18n][$keyPage]['moduleId']]['version'], template::flag($keyi18n, '20px') . ' ' . $pagesInfos[$keyi18n][$keyPage]['title'] . ' (' . $keyPage . ')', template::button('dataExport' . $keyPage, [ - 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, + 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$classesContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, // appel de fonction vaut exécution, utiliser un paramètre 'value' => template::ico('download-cloud'), 'help' => 'Sauvegarder les données du module dans le gestionnaire de fichiers' ]), template::button('dataExport' . $keyPage, [ - 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, + 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$classesContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, // appel de fonction vaut exécution, utiliser un paramètre 'value' => template::ico('download'), 'help' => 'Sauvegarder et télécharger les données du module' ]), template::button('dataDelete' . $keyPage, [ - 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, + 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$classesContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, // appel de fonction vaut exécution, utiliser un paramètre 'value' => template::ico('trash'), 'class' => 'buttonRed dataDelete', diff --git a/module/search/search.php b/module/search/search.php index bf88662..4fe0194 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -213,8 +213,8 @@ class search extends common ) { $url = $parentId; $titre = $this->getData(['page', $parentId, 'title']); - //$content = file_get_contents(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getData(['page', $parentId, 'content'])); - $content = $this->getPage($parentId, self::$i18nContent); + //$content = file_get_contents(self::DATA_DIR . self::$classesContent . '/content/' . $this->getData(['page', $parentId, 'content'])); + $content = $this->getPage($parentId, self::$classesContent); $content = $titre . ' ' . $content; // Pages sauf pages filles et articles de blog $tempData = $this->occurrence($url, $titre, $content, $motclef, self::$motentier); @@ -232,8 +232,8 @@ class search extends common ) { $url = $childId; $titre = $this->getData(['page', $childId, 'title']); - //$content = file_get_contents(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getData(['page', $childId, 'content'])); - $content = $this->getPage($childId, self::$i18nContent); + //$content = file_get_contents(self::DATA_DIR . self::$classesContent . '/content/' . $this->getData(['page', $childId, 'content'])); + $content = $this->getPage($childId, self::$classesContent); $content = $titre . ' ' . $content; //Pages filles $tempData = $this->occurrence($url, $titre, $content, $motclef, self::$motentier);