# HG changeset patch # User Matti Hamalainen # Date 1544975163 -7200 # Node ID a31ff7ecb7853526233baadad38540d2bbafeb5c # Parent 745af791367d6e5f455888f0fdf3a5ee32003ae6 Add few comments. diff -r 745af791367d -r a31ff7ecb785 mgtool.php --- a/mgtool.php Sun Dec 16 17:45:51 2018 +0200 +++ b/mgtool.php Sun Dec 16 17:46:03 2018 +0200 @@ -956,6 +956,7 @@ pcntl_signal(SIGQUIT, "mgSigHandler"); pcntl_signal(SIGINT, "mgSigHandler"); +// Check for improperly configured PHP if (extension_loaded("imagick") && extension_loaded("gmagick")) { mgError("FATAL ERROR! Both ImageMagick AND GraphicsMagick modules enabled in PHP! This will cause problems! Refusing to work.\n"); @@ -968,12 +969,16 @@ exit(1); } +// Check settings if (mgReadSettings() === FALSE) die("MGallery is not configured, failed to find a configuration file.\n"); +// Configure the timezone if (($pageTimeZone = mgGetSetting("timezone")) !== NULL) date_default_timezone_set($pageTimeZone); + +// Check for commandline arguments $cmd = mgCArgLC(1); switch ($cmd) {