Mercurial > hg > mgallery
diff mgallery.php @ 297:77f85b1f35f2
Improve configuration file handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 02 Aug 2019 12:54:51 +0300 |
parents | f14ed58ef72b |
children | f8d812d3194f |
line wrap: on
line diff
--- a/mgallery.php Fri Aug 02 09:26:12 2019 +0300 +++ b/mgallery.php Fri Aug 02 12:54:51 2019 +0300 @@ -447,7 +447,17 @@ // // Read and process gallery settings // -mgReadSettings(); +if (mgReadSettings($searchPaths) === FALSE) +{ + mgPrintPageHeader("Internal error!", "galleryPage"); + + echo + "<h1>Internal error!</h1>\n". + "<p>Could not find MGallery configuration file.</p>"; + + mgPrintPageFooter(); + exit; +} $pageCSS = mgGetSetting("css"); $pageJSFile = mgGetSetting("js_file");