Mercurial > hg > mgallery
comparison mgtool.php @ 265:a31ff7ecb785
Add few comments.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 16 Dec 2018 17:46:03 +0200 |
parents | 745af791367d |
children | 07b2b271c12a |
comparison
equal
deleted
inserted
replaced
264:745af791367d | 265:a31ff7ecb785 |
---|---|
954 pcntl_signal(SIGTERM, "mgSigHandler"); | 954 pcntl_signal(SIGTERM, "mgSigHandler"); |
955 pcntl_signal(SIGHUP, "mgSigHandler"); | 955 pcntl_signal(SIGHUP, "mgSigHandler"); |
956 pcntl_signal(SIGQUIT, "mgSigHandler"); | 956 pcntl_signal(SIGQUIT, "mgSigHandler"); |
957 pcntl_signal(SIGINT, "mgSigHandler"); | 957 pcntl_signal(SIGINT, "mgSigHandler"); |
958 | 958 |
959 // Check for improperly configured PHP | |
959 if (extension_loaded("imagick") && extension_loaded("gmagick")) | 960 if (extension_loaded("imagick") && extension_loaded("gmagick")) |
960 { | 961 { |
961 mgError("FATAL ERROR! Both ImageMagick AND GraphicsMagick modules enabled in PHP! This will cause problems! Refusing to work.\n"); | 962 mgError("FATAL ERROR! Both ImageMagick AND GraphicsMagick modules enabled in PHP! This will cause problems! Refusing to work.\n"); |
962 exit(1); | 963 exit(1); |
963 } | 964 } |
966 { | 967 { |
967 mgError("No ImageMagick OR GraphicsMagick module available in PHP!\n"); | 968 mgError("No ImageMagick OR GraphicsMagick module available in PHP!\n"); |
968 exit(1); | 969 exit(1); |
969 } | 970 } |
970 | 971 |
972 // Check settings | |
971 if (mgReadSettings() === FALSE) | 973 if (mgReadSettings() === FALSE) |
972 die("MGallery is not configured, failed to find a configuration file.\n"); | 974 die("MGallery is not configured, failed to find a configuration file.\n"); |
973 | 975 |
976 // Configure the timezone | |
974 if (($pageTimeZone = mgGetSetting("timezone")) !== NULL) | 977 if (($pageTimeZone = mgGetSetting("timezone")) !== NULL) |
975 date_default_timezone_set($pageTimeZone); | 978 date_default_timezone_set($pageTimeZone); |
976 | 979 |
980 | |
981 // Check for commandline arguments | |
977 $cmd = mgCArgLC(1); | 982 $cmd = mgCArgLC(1); |
978 switch ($cmd) | 983 switch ($cmd) |
979 { | 984 { |
980 case "--version": | 985 case "--version": |
981 case "version": | 986 case "version": |