Fixed settings check (#139)

This commit is contained in:
Tobias Reich 2014-04-26 14:35:17 +02:00
parent b307e8b7ca
commit e74ce6b5a5

View File

@ -50,12 +50,12 @@ if (!isset($dbPassword)) $error .= ('Error 402: No property for $dbPassword in
if (!isset($dbHost)||$dbHost==='') $error .= ('Error 403: No property for $dbHost in config.php' . PHP_EOL); if (!isset($dbHost)||$dbHost==='') $error .= ('Error 403: No property for $dbHost in config.php' . PHP_EOL);
# Settings # Settings
if (!$settings['username']||$settings['username']=='') $error .= ('Error 404: Username empty or not set in database' . PHP_EOL); if (!isset($settings['username'])||$settings['username']=='') $error .= ('Error 404: Username empty or not set in database' . PHP_EOL);
if (!$settings['password']||$settings['password']=='') $error .= ('Error 405: Password empty or not set in database' . PHP_EOL); if (!isset($settings['password'])||$settings['password']=='') $error .= ('Error 405: Password empty or not set in database' . PHP_EOL);
if (!$settings['thumbQuality']||$settings['thumbQuality']=='') $error .= ('Error 406: No or wrong property for thumbQuality in database' . PHP_EOL); if (!isset($settings['thumbQuality'])||$settings['thumbQuality']=='') $error .= ('Error 406: No or wrong property for thumbQuality in database' . PHP_EOL);
if (!$settings['sorting']||$settings['sorting']=='') $error .= ('Error 407: Wrong property for sorting in database' . PHP_EOL); if (!isset($settings['sorting'])||$settings['sorting']=='') $error .= ('Error 407: Wrong property for sorting in database' . PHP_EOL);
if (!$settings['plugins']) $error .= ('Error 408: No property for plugins in database' . PHP_EOL); if (!isset($settings['plugins'])) $error .= ('Error 408: No property for plugins in database' . PHP_EOL);
if (!$settings['checkForUpdates']||($settings['checkForUpdates']!='0'&&$settings['checkForUpdates']!='1')) $error .= ('Error 409: No or wrong property for checkForUpdates in database' . PHP_EOL); if (!isset($settings['checkForUpdates'])||($settings['checkForUpdates']!='0'&&$settings['checkForUpdates']!='1')) $error .= ('Error 409: No or wrong property for checkForUpdates in database' . PHP_EOL);
# Permissions # Permissions
if (substr(sprintf('%o', @fileperms(LYCHEE_UPLOADS_BIG)), -4)!='0777') $error .= ('Error 500: Wrong permissions for \'uploads/big\' (777 required)' . PHP_EOL); if (substr(sprintf('%o', @fileperms(LYCHEE_UPLOADS_BIG)), -4)!='0777') $error .= ('Error 500: Wrong permissions for \'uploads/big\' (777 required)' . PHP_EOL);