Message d'erreur si le contenu de la page est absent.
This commit is contained in:
parent
ebca94dc3f
commit
07f8751501
@ -473,7 +473,11 @@ class common {
|
|||||||
*/
|
*/
|
||||||
public function getPage($page, $lang) {
|
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…
Reference in New Issue
Block a user