From f2466b6f2435ded4002deeb1b55b92ad349a86b0 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 30 May 2019 19:53:18 +0200 Subject: [PATCH] [9.1.08] html validation --- core/core.php | 53 ++++++++++++++++++++++---------------------- core/layout/main.php | 2 +- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/core/core.php b/core/core.php index 2dc816a0..2aa3b603 100644 --- a/core/core.php +++ b/core/core.php @@ -1858,7 +1858,7 @@ class layout extends common { $contentLeft = $this->core->output['contentLeft']; $mark = strrpos($contentLeft,'[]') !== false ? strrpos($contentLeft,'[]') : strlen($contentLeft); echo substr($contentLeft,0,$mark); - echo ''; echo substr($contentLeft,$mark+2,strlen($contentLeft)); @@ -1878,7 +1878,7 @@ class layout extends common { $contentRight = $this->core->output['contentRight']; $mark = strrpos($contentRight,'[]') !== false ? strrpos($contentRight,'[]') : strlen($contentRight); echo substr($contentRight,0,$mark); - echo ''; echo substr($contentRight,$mark+2,strlen($contentRight)); @@ -1891,11 +1891,11 @@ class layout extends common { public function showCopyright() { // Ouverture Bloc copyright $items = '
'; - $items .= ''; + $items .= ''; // Affichage de motorisé par $items .= 'getData(['theme','footer','displayCopyright']) === false ? 'class="displayNone"' : ''; - $items .= '>Motorisé par '; + $items .= '>Motorisé par '; // Toujours afficher le nom du CMS $items .= ''; $items .= 'ZwiiCMS'; @@ -1921,7 +1921,7 @@ class layout extends common { ($this->getUrl(0) === 'theme' ? 'class="displayNone"' : '') . '> | Connexion'; + '" data-tippy-content="Connexion à l\'administration" rel="nofollow">Connexion'; } // Fermeture du bloc copyright $items .= '
'; @@ -1947,7 +1947,7 @@ class layout extends common { */ public function showFooterText() { if($footerText = $this->getData(['theme', 'footer', 'text']) OR $this->getUrl(0) === 'theme') { - echo '
' . nl2br($footerText) . '
'; + echo '
' . nl2br($footerText) . '
'; } } @@ -2016,7 +2016,8 @@ class layout extends common { } // ------------------------------------------------ $items .= ''; - if ($this->getdata(['page',$parentPageId,'hideMenuChildren']) === true) { + if ($this->getdata(['page',$parentPageId,'hideMenuChildren']) === true || + empty($childrenPageIds)) { continue; } $items .= ''; - $items .= ''; + } // Lien de connexion @@ -2123,7 +2122,8 @@ class layout extends common { foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) { // Ne pas afficher les entrées masquées - if ($this->getData(['page',$parentPageId,'hideMenuSide']) === true ) { + if ($this->getData(['page',$parentPageId,'hideMenuSide']) === true || + empty($childrenPageIds) ) { continue; } // Filtre actif et nom de la page parente courante différente, on sort de la boucle @@ -2136,7 +2136,7 @@ class layout extends common { // Mise en page de l'item; // Ne pas afficher le parent d'une sous-page quand l'option est sélectionnée. if ($onlyChildren === false) { - $items .= '
  • '; if ( $this->getData(['page',$parentPageId,'disable']) === true AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) { $items .= ''; @@ -2160,22 +2160,22 @@ class layout extends common { //} // ------------------------------------------------ // A garder mais désactivé avec la suppresion du thème - $items .= ''; - } else { - $items .= ''; + $items .= ''; + } + if ($onlyChildren === false) { + $items .= ''; + } } // Retourne les items du menu echo ''; @@ -2253,7 +2254,7 @@ class layout extends common { unset($_SESSION['ZWII_NOTIFICATION_OTHER']); } if(isset($notification) AND isset($notificationClass)) { - echo '
    ' . $notification . '' . template::ico('cancel') . '
    '; + echo '
    ' . $notification . '' . template::ico('cancel') . '
    '; } } @@ -2762,7 +2763,7 @@ class template { * @return string */ public static function help($text) { - return '' . self::ico('help') . ''; + return '' . self::ico('help') . ''; } /** @@ -2801,7 +2802,7 @@ class template { * @return string */ public static function ico($ico, $margin = '', $animate = false, $fontSize = '1em') { - return ''; + return ''; } /** diff --git a/core/layout/main.php b/core/layout/main.php index 559a2a99..83be4838 100755 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -45,7 +45,7 @@ getData(['theme', 'header', 'position']) === 'body'): ?> -
    +
    getData(['theme','header','linkHome'])){ echo "" ;} ?>