diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-04-16 17:47:27 +0400 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-04-16 17:49:55 +0400 |
commit | 1495ec0f31b63c9bb04047f47cbf68abaab30b12 (patch) | |
tree | b5c272569342646519d1a33a6e415b299a53faa1 /index.php | |
parent | b5f913a3fc66a3036fc7ea291d67a72f7a0ecd40 (diff) |
show server configuration errors on seperate page
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/index.php b/index.php index 8f5c99fcd85..105a04ad76e 100644 --- a/index.php +++ b/index.php @@ -24,7 +24,12 @@ require_once( 'lib/base.php' ); require_once( 'appconfig.php' ); require_once( 'template.php' ); -if( OC_USER::isLoggedIn()){ + +// check if the server is correctly configured for ownCloud +$errors=OC_UTIL::checkServer(); +if(count($errors)>0){ + OC_TEMPLATE::printGuestPage( "", "error", array( "errors" => $errors )); +}elseif( OC_USER::isLoggedIn()){ if( $_GET["logout"] ){ OC_USER::logout(); header( "Location: $WEBROOT"); @@ -34,8 +39,7 @@ if( OC_USER::isLoggedIn()){ header( "Location: ".OC_APPCONFIG::getValue( "core", "defaultpage", "files/index.php" )); exit(); } -} -else{ +}else{ if( OC_USER::login( $_POST["user"], $_POST["password"] )){ header( "Location: ".OC_APPCONFIG::getValue( "core", "defaultpage", "files/index.php" )); exit(); |