erreur installation default

This commit is contained in:
fredtempez 2020-04-03 18:50:44 +02:00
parent 1d94e5015f
commit c66f28027b
3 changed files with 18 additions and 25 deletions

View File

@ -1108,15 +1108,15 @@ class common {
// Version 9.2.27 // Version 9.2.27
if($this->getData(['core', 'dataVersion']) < 9227) { if($this->getData(['core', 'dataVersion']) < 9227) {
// Forcer la régénération du thème // Forcer la régénération du thème
if (file_exists(self::DATA_DIR.'theme.css') === false) { if (file_exists(self::DATA_DIR.'theme.css')) {
unlink (self::DATA_DIR.'theme.css'); unlink (self::DATA_DIR.'theme.css');
} }
$this->setData(['core', 'dataVersion', 9227]);
}
// Version 10.0.00
if($this->getData(['core', 'dataVersion']) < 10000) {
$this->setData(['config', 'faviconDark','faviconDark.ico']);
// Numérotation des galeries // Numérotation des galeries
// Lire toutes les pages et trouver celle avec le module gallery
// Parcourir les galeries du modules
// Verifier la présence des champs : sort et postion
// Tableau avec les pages
$pageList = array(); $pageList = array();
foreach ($this->getHierarchy(null,null,null) as $parentKey=>$parentValue) { foreach ($this->getHierarchy(null,null,null) as $parentKey=>$parentValue) {
$pageList [] = $parentKey; $pageList [] = $parentKey;
@ -1141,11 +1141,6 @@ class common {
} }
} }
} }
$this->setData(['core', 'dataVersion', 9227]);
}
// Version 10.0.00
if($this->getData(['core', 'dataVersion']) < 10000) {
$this->setData(['config', 'faviconDark','faviconDark.ico']);
$this->setData(['core', 'dataVersion', 10000]); $this->setData(['core', 'dataVersion', 10000]);
} }

View File

@ -27,7 +27,7 @@ class init extends common {
'proxyType' => "tcp://" 'proxyType' => "tcp://"
], ],
'core' => [ 'core' => [
'dataVersion' => 10000, 'dataVersion' => 0,
'lastBackup' => 0, 'lastBackup' => 0,
'lastClearTmp' => 0, 'lastClearTmp' => 0,
'lastAutoUpdate' => 0, 'lastAutoUpdate' => 0,
@ -537,7 +537,9 @@ class init extends common {
'beaux-paysages' => [ 'beaux-paysages' => [
'config' => [ 'config' => [
'name' => 'Beaux paysages', 'name' => 'Beaux paysages',
'directory' => self::FILE_DIR.'source/galerie/landscape' 'directory' => self::FILE_DIR.'source/galerie/landscape',
'sort' => 'SORT_ASC',
'position' => 1
], ],
'legend' => [ 'legend' => [
'desertjpg' => 'Un désert', 'desertjpg' => 'Un désert',
@ -548,7 +550,9 @@ class init extends common {
'espace' => [ 'espace' => [
'config' => [ 'config' => [
'name' => 'Espace', 'name' => 'Espace',
'directory' => self::FILE_DIR.'source/galerie/space' 'directory' => self::FILE_DIR.'source/galerie/space',
'sort' => 'SORT_ASC',
'position' => 2
], ],
'legend' => [ 'legend' => [
'earthjpg' => 'La Terre et la Lune', 'earthjpg' => 'La Terre et la Lune',

View File

@ -95,13 +95,6 @@ class gallery extends common {
template::ico('sort'), template::ico('sort'),
$gallery['config']['name'], $gallery['config']['name'],
$gallery['config']['directory'], $gallery['config']['directory'],
//$gallery['config']['order'],
/*
template::select('galleryConfigOrder', $galeryOrder , [
'selected' => $gallery['config']['order'],
'class' => 'configOrder'
]),*/
template::button('galleryConfigEdit' . $galleryId , [ template::button('galleryConfigEdit' . $galleryId , [
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $galleryId . '/' . $_SESSION['csrf'], 'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $galleryId . '/' . $_SESSION['csrf'],
'value' => template::ico('pencil') 'value' => template::ico('pencil')
@ -127,8 +120,9 @@ class gallery extends common {
'config' => [ 'config' => [
'name' => $this->getInput('galleryConfigName'), 'name' => $this->getInput('galleryConfigName'),
'directory' => $this->getInput('galleryConfigDirectory', helper::FILTER_STRING_SHORT, true), 'directory' => $this->getInput('galleryConfigDirectory', helper::FILTER_STRING_SHORT, true),
'homePicture' => '',
'sort' => $this->getInput('galleryConfigSort'), 'sort' => $this->getInput('galleryConfigSort'),
'order' => count($this->getData(['module',$this->getUrl(0)])) + 1 'position' => count($this->getData(['module',$this->getUrl(0)])) + 1
], ],
'legend' => [] 'legend' => []
]]); ]]);