diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-02-06 17:54:20 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-02-06 17:56:45 +0100 |
commit | 3582f7bd09f81e1aadb583ab0d36fb0cbc695514 (patch) | |
tree | 1e504c42a39c292efa514c107d32046b4694716d /lib/setup.php | |
parent | 1adcc5fd23004cd7253c87134c30d853e1b3b8b8 (diff) | |
download | nextcloud-server-3582f7bd09f81e1aadb583ab0d36fb0cbc695514.tar.gz nextcloud-server-3582f7bd09f81e1aadb583ab0d36fb0cbc695514.zip |
Execute the post setup check after finishing the setup
Diffstat (limited to 'lib/setup.php')
-rw-r--r-- | lib/setup.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/setup.php b/lib/setup.php index 4dd190b99fb..f342142c957 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -610,4 +610,24 @@ class OC_Setup { file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/.htaccess', $content); file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/index.html', ''); } + + /** + * @brief Post installation checks + */ + public static function postSetupCheck($params) { + // setup was successful -> webdav testing now + if (OC_Util::isWebDAVWorking()) { + header("Location: ".OC::$WEBROOT.'/'); + } else { + $l=OC_L10N::get('lib'); + + $error = $l->t('Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.'); + $hint = $l->t('Please double check the <a href=\'%s\'>installation guides</a>.', 'http://doc.owncloud.org/server/5.0/admin_manual/installation.html'); + + $tmpl = new OC_Template('', 'error', 'guest'); + $tmpl->assign('errors', array(1 => array('error' => $error, 'hint' => $hint)), false); + $tmpl->printPage(); + exit(); + } + } } |