diff --git a/README.md b/README.md index 79c0880..0c2f4cf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ZwiiCampus 1.10.03 +# ZwiiCampus 1.10.04 ZwiiCampus (Learning Management System) est logiciel auteur destiné à mettre en ligne des tutoriels. Il dispose de plusieurs modalités d'ouverture et d'accès des contenus. Basé sur la version 13 du CMS Zwii, la structure logicielle est solide, le framework de Zwii est éprouvé. diff --git a/core/class/layout.class.php b/core/class/layout.class.php index 8c891b2..6c0f9b6 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -1018,7 +1018,7 @@ class layout extends common or $this->getUrl(0) === '' ) { // Bouton Editer une page - if ($this->getUser('permission', 'page', 'edit')) { + if ($this->getUser('permission', 'page', 'edit') and $this->geturl(1) !== 'edit') { $leftItems .= '
  • ' . template::ico('pencil', [ 'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0) . '/' . self::$siteContent, 'help' => 'Éditer la page' diff --git a/core/core.php b/core/core.php index 9581333..5194600 100644 --- a/core/core.php +++ b/core/core.php @@ -51,7 +51,7 @@ class common const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '1.10.03'; + const ZWII_VERSION = '1.10.04'; // URL autoupdate const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/'; diff --git a/core/module/config/config.php b/core/module/config/config.php index bcc4134..282f901 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -490,7 +490,7 @@ class config extends common 'cookiesFooterText' => $this->getInput('configLocaleCookiesFooterText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)), 'buttonValidLabel' => $this->getInput('configLocaleCookiesButtonText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)), ], - 'social' => [ + 'social' => [ 'facebookId' => $this->getInput('socialFacebookId'), 'linkedinId' => $this->getInput('socialLinkedinId'), 'instagramId' => $this->getInput('socialInstagramId'), @@ -557,6 +557,12 @@ class config extends common // Ajout des lignes dans le .htaccess $fileContent = file_get_contents('.htaccess'); $rewriteData = PHP_EOL . + ' # Enlever le slash final des URL' . PHP_EOL . + 'RewriteCond %{REQUEST_FILENAME} !-f' . PHP_EOL . + 'RewriteCond %{REQUEST_FILENAME} !-d' . PHP_EOL . + 'RewriteCond %{REQUEST_URI} ^(.+)/$' . PHP_EOL . + 'RewriteRule ^ %1 [R=301,L]' . PHP_EOL . + PHP_EOL . '# URL rewriting' . PHP_EOL . '' . PHP_EOL . "\tRewriteEngine on" . PHP_EOL .