summaryrefslogtreecommitdiffstats
path: root/lib/setup.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-02-09 19:15:23 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2013-02-09 19:15:23 +0100
commitb9089fe8d966b48e4c8dc3f06fd365fc506a0199 (patch)
tree36d04441896a142a69bba884ec6c8d9ba00d10b5 /lib/setup.php
parent05b46f78281e5df49a5c6a0513a37eaf03c3c29d (diff)
parent0222c589ac7c006c09dca6cea09cae9a1006a0b4 (diff)
downloadnextcloud-server-b9089fe8d966b48e4c8dc3f06fd365fc506a0199.tar.gz
nextcloud-server-b9089fe8d966b48e4c8dc3f06fd365fc506a0199.zip
Merge branch 'master' into fixing-1424-master
Diffstat (limited to 'lib/setup.php')
-rw-r--r--lib/setup.php20
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();
+ }
+ }
}