comparison mgtool.php @ 297:77f85b1f35f2

Improve configuration file handling.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 02 Aug 2019 12:54:51 +0300
parents 486398fb60ea
children 338bc2941976
comparison
equal deleted inserted replaced
296:f14ed58ef72b 297:77f85b1f35f2
1244 mgError("No ImageMagick OR GraphicsMagick module available in PHP!\n"); 1244 mgError("No ImageMagick OR GraphicsMagick module available in PHP!\n");
1245 exit(1); 1245 exit(1);
1246 } 1246 }
1247 1247
1248 // Check settings 1248 // Check settings
1249 if (mgReadSettings() === FALSE) 1249 if (mgReadSettings($searchPaths) === FALSE)
1250 die("MGallery is not configured, failed to find a configuration file.\n"); 1250 {
1251 die("MGallery is not configured, failed to find a configuration file.\n".
1252 "Attempted search paths:\n".implode("\n", $searchPaths)."\n");
1253 }
1251 1254
1252 // Configure the timezone 1255 // Configure the timezone
1253 if (($pageTimeZone = mgGetSetting("timezone")) !== NULL) 1256 if (($pageTimeZone = mgGetSetting("timezone")) !== NULL)
1254 date_default_timezone_set($pageTimeZone); 1257 date_default_timezone_set($pageTimeZone);
1255 1258