Browse Source

erreur installation default

pull/6/head
fredtempez 2 years ago
parent
commit
c66f28027b
  1. 23
      core/core.php
  2. 10
      core/module/install/ressource/defaultdata.php
  3. 10
      module/gallery/gallery.php

23
core/core.php

@ -1108,22 +1108,22 @@ class common {
// Version 9.2.27
if($this->getData(['core', 'dataVersion']) < 9227) {
// 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');
}
}
$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
// 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();
foreach ($this->getHierarchy(null,null,null) as $parentKey=>$parentValue) {
$pageList [] = $parentKey;
foreach ($parentValue as $childKey) {
$pageList [] = $childKey;
}
}
}
// Parcourir toutes les pages
foreach ($pageList as $parentKey => $parent) {
//La page a une galerie
@ -1140,12 +1140,7 @@ 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]);
}

10
core/module/install/ressource/defaultdata.php

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

10
module/gallery/gallery.php

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

Loading…
Cancel
Save