diff --git a/core/core.php b/core/core.php index b2a26978..25bc1d1a 100755 --- a/core/core.php +++ b/core/core.php @@ -900,7 +900,9 @@ class common { $sitemap->finalize(); // Update robots.txt file in output directory or create a new one + if ($this->getData(['config','seo', 'robots']) === true) { + unlink('robots.txt'); $sitemap->updateRobots(); } else { copy('core/module/install/ressource/robots.txt', 'robots.txt'); diff --git a/core/module/config/config.php b/core/module/config/config.php index 1cee16fd..75855924 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -191,7 +191,7 @@ class config extends common { // Valeurs en sortie $this->addOutput([ - 'notification' => $successSitemap ? 'Le sitemap a été mis à jour' : 'Echec d\'écriture, le site map n\'a pas été mis à jour', + 'notification' => $successSitemap ? 'Mises à jour des fichiers sitemap et robots.txt' : 'Echec d\'écriture, le site map n\'a pas été mis à jour', 'redirect' => helper::baseUrl() . 'config/advanced', 'state' => $successSitemap ]); @@ -544,7 +544,7 @@ class config extends common { // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . $this->getUrl(), - 'notification' => 'Modifications enregistrées', + 'notification' => 'Modifications enregistrées ' , 'state' => true ]); } diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 55c5fb38..d689bf4a 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -28,7 +28,7 @@ class init extends common { 'enable' => true, ], 'seo' => [ - 'seo' => true + 'robots' => true ], 'connect' => [ 'timeout' => 600,