diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-11-25 21:25:04 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-11-25 21:25:04 +0100 |
commit | 9fbccc83e3bdae664f7696da8d1902a516252830 (patch) | |
tree | a55ca135dd1e16a3c66ba9031dc3a4668c600e13 /lib/base.php | |
parent | a609a5364779acb8ac27b337ad453dc9c8a39811 (diff) | |
parent | 844b4785f1e992391d51ef34eacc5cfda107ee50 (diff) | |
download | nextcloud-server-9fbccc83e3bdae664f7696da8d1902a516252830.tar.gz nextcloud-server-9fbccc83e3bdae664f7696da8d1902a516252830.zip |
merge master into single-user-mode
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/lib/base.php b/lib/base.php index b361ac3c71a..2feedd81d8c 100644 --- a/lib/base.php +++ b/lib/base.php @@ -178,11 +178,19 @@ class OC { if (file_exists(OC::$SERVERROOT . "/config/config.php") and !is_writable(OC::$SERVERROOT . "/config/config.php")) { $defaults = new OC_Defaults(); - OC_Template::printErrorPage( - "Can't write into config directory!", - 'This can usually be fixed by ' - .'<a href="' . \OC_Helper::linkToDocs('admin-dir_permissions') . '" target="_blank">giving the webserver write access to the config directory</a>.' - ); + if (self::$CLI) { + echo "Can't write into config directory!\n"; + echo "This can usually be fixed by giving the webserver write access to the config directory\n"; + echo "\n"; + echo "See " . \OC_Helper::linkToDocs('admin-dir_permissions') . "\n"; + exit; + } else { + OC_Template::printErrorPage( + "Can't write into config directory!", + 'This can usually be fixed by ' + .'<a href="' . \OC_Helper::linkToDocs('admin-dir_permissions') . '" target="_blank">giving the webserver write access to the config directory</a>.' + ); + } } } @@ -496,7 +504,14 @@ class OC { $errors = OC_Util::checkServer(); if (count($errors) > 0) { - OC_Template::printGuestPage('', 'error', array('errors' => $errors)); + if (self::$CLI) { + foreach ($errors as $error) { + echo $error['error']."\n"; + echo $error['hint'] . "\n\n"; + } + } else { + OC_Template::printGuestPage('', 'error', array('errors' => $errors)); + } exit; } |