[10.0.28.dev] Reset homePage
This commit is contained in:
parent
c78484d4b3
commit
1236951cd4
|
@ -225,11 +225,6 @@ class page extends common {
|
||||||
$this->setData(['page', $hierarchyPageId, 'position', $lastPosition]);
|
$this->setData(['page', $hierarchyPageId, 'position', $lastPosition]);
|
||||||
// Incrémente pour la prochaine position
|
// Incrémente pour la prochaine position
|
||||||
$lastPosition++;
|
$lastPosition++;
|
||||||
|
|
||||||
// Une seule homepage, si homePage est true, désactiver les autres pages
|
|
||||||
if ($this->getinput('pageHomePageId', helper::FILTER_BOOLEAN) === true) {
|
|
||||||
$this->setData(['page',$hierarchyPageId,"homePageId", false]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ($this->getinput('pageEditBlock') !== 'bar') {
|
if ($this->getinput('pageEditBlock') !== 'bar') {
|
||||||
$barLeft = $this->getinput('pageEditBarLeft');
|
$barLeft = $this->getinput('pageEditBarLeft');
|
||||||
|
@ -244,6 +239,12 @@ class page extends common {
|
||||||
$position = 0;
|
$position = 0;
|
||||||
$hideTitle = true;
|
$hideTitle = true;
|
||||||
}
|
}
|
||||||
|
// Reset homePage
|
||||||
|
if ($this->getinput('pageHomePageId', helper::FILTER_BOOLEAN) === true ) {
|
||||||
|
foreach($hierarchy as $hierarchyPageId) {
|
||||||
|
$this->setData(['page',$hierarchyPageId,"homePageId", false]);
|
||||||
|
}
|
||||||
|
}
|
||||||
// Modifie la page ou en crée une nouvelle si l'id a changé
|
// Modifie la page ou en crée une nouvelle si l'id a changé
|
||||||
$this->setData([
|
$this->setData([
|
||||||
'page',
|
'page',
|
||||||
|
|
Loading…
Reference in New Issue