Mercurial > hg > mgallery
changeset 265:a31ff7ecb785
Add few comments.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 16 Dec 2018 17:46:03 +0200 |
parents | 745af791367d |
children | 92ce2185bbb3 |
files | mgtool.php |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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) {