[9.2.05] suppression totale de swiper

This commit is contained in:
fredtempez 2019-08-16 09:40:46 +02:00
parent 82fe47c6ce
commit 14d8d6749c
1 changed files with 18 additions and 1 deletions

View File

@ -33,7 +33,7 @@ class common {
const TEMP_DIR = 'site/tmp/';
// Numéro de version
const ZWII_VERSION = '9.2.04';
const ZWII_VERSION = '9.2.05';
public static $actions = [];
public static $coreModuleIds = [
@ -944,6 +944,23 @@ class common {
$this->setData(['core', 'dataVersion', 9200]);
$this->SaveData();
}
// Version 9.2.05
if($this->getData(['core', 'dataVersion']) < 9205) {
// Nettoyage Swiper
if (file_exists('core/vendor/tinymce/templates/swiper.html')) {
unlink ('core/vendor/tinymce/templates/swiper.html');
}
if (is_dir('core/vendor/swiper')) {
$dir = getcwd();
chdir('core/vendor/swiper');
$files = glob('*');
foreach($files as $file) unlink($file);
chdir($dir);
rmdir ('core/vendor/swiper/');
}
$this->setData(['core', 'dataVersion', 9205]);
$this->SaveData();
}
}
}