diff --git a/module/slider/changes.md b/module/slider/changes.md index a5b2c781..4ed45c84 100644 --- a/module/slider/changes.md +++ b/module/slider/changes.md @@ -1,3 +1,5 @@ +# Version 6.2 +- Applique les profils # Version 6.1 - Corrige le calcul de la largeur lorsque la largeur de l'écran est de 100% # Version 6.0 diff --git a/module/slider/slider.php b/module/slider/slider.php index f583cc1a..abcdf330 100644 --- a/module/slider/slider.php +++ b/module/slider/slider.php @@ -27,7 +27,7 @@ class slider extends common 'index' => self::GROUP_VISITOR ]; - const VERSION = '6.1'; + const VERSION = '6.2'; const REALNAME = 'Carrousel'; const DELETE = true; const UPDATE = '0.0'; @@ -266,20 +266,15 @@ class slider extends common { // $url prend l'adresse sans le token // La galerie n'existe pas - if ($this->getData(['module', $this->getUrl(0), $this->getUrl(2)]) === null) { + if ( + $this->getUser('permission', __CLASS__, __FUNCTION__) !== true || + $this->getData(['module', $this->getUrl(0), $this->getUrl(2)]) === null + ) { // Valeurs en sortie $this->addOutput([ 'access' => false ]); } - // Jeton incorrect - if ($this->getUrl(3) !== $_SESSION['csrf']) { - // Valeurs en sortie - $this->addOutput([ - 'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config', - 'notification' => 'Suppression non autorisée' - ]); - } // Suppression else { $this->deleteData(['module', $this->getUrl(0), $this->getUrl(2)]); @@ -311,7 +306,10 @@ class slider extends common public function theme() { // Soumission du formulaire - if ($this->isPost()) { + if ( + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && + $this->isPost() + ) { // Equilibrer les durées $speed = $this->getInput('sliderThemespeed', helper::FILTER_INT);