Browse Source

Message d'erreur si le contenu de la page est absent.

master
fredtempez 9 months ago
parent
commit
07f8751501
  1. 6
      core/core.php

6
core/core.php

@ -473,7 +473,11 @@ class common {
*/
public function getPage($page, $lang) {
return file_get_contents(self::DATA_DIR . $lang . '/content/' . $this->getData(['page', $page, 'content']));
if (file_exists(self::DATA_DIR . $lang . '/content/' . $this->getData(['page', $page, 'content']))) {
return file_get_contents(self::DATA_DIR . $lang . '/content/' . $this->getData(['page', $page, 'content']));
} else {
return 'Aucun contenu trouvé.';
}
}

Loading…
Cancel
Save