diff --git a/CHANGES.md b/CHANGES.md index aa509e67..485c088a 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ - Bug de la génération des feuilles de style des fontes, nouvelle correction. ### Amélioration : - Responsive File Manager (RFM), 4 scripts externes sont chargés à partir du site et non d'un CDN (jquery, fabric, filesaver et jplayer). +- Edition d'une page contenant un module effacé sur le disque, la modification et l'effacement de la page sont autorisés. ## Version 11.5.02 ### Corrections : diff --git a/core/core.php b/core/core.php index 09ae33ee..a626e41c 100644 --- a/core/core.php +++ b/core/core.php @@ -2092,6 +2092,8 @@ class common { $this->output['showBarEditButton'] // Sur une page sans module OR $this->getData(['page', $this->getUrl(0), 'moduleId']) === '' + // Sur une page avec un module invalide + OR !class_exists($this->getData(['page', $this->getUrl(2), 'moduleId'])) // Sur une page d'accueil OR $this->getUrl(0) === '' ) { @@ -2739,10 +2741,12 @@ class core extends common { ' › '. $this->getData(['page', $this->getUrl(0), 'title']); } - // Importe la page + // Importe la page simple sans module ou avec un module inexistant if( $this->getData(['page', $this->getUrl(0)]) !== null - AND $this->getData(['page', $this->getUrl(0), 'moduleId']) === '' + AND ( $this->getData(['page', $this->getUrl(0), 'moduleId']) === '' + OR !class_exists($this->getData(['page', $this->getUrl(0), 'moduleId'])) + ) AND $access ) { $this->addOutput([ diff --git a/core/module/page/view/edit/edit.php b/core/module/page/view/edit/edit.php index e6a1fa82..c03c1b26 100644 --- a/core/module/page/view/edit/edit.php +++ b/core/module/page/view/edit/edit.php @@ -71,7 +71,7 @@ 'En cas de changement de module, les données du module précédent seront supprimées.', 'label' => 'Module', - 'selected' => $this->getData(['page', $this->getUrl(2), 'moduleId']) + 'selected' => class_exists($this->getData(['page', $this->getUrl(2), 'moduleId'])) ? $this->getData(['page', $this->getUrl(2), 'moduleId']) : 0 ]); ?> $this->getData(['page', $this->getUrl(2), 'moduleId'])]); ?>