summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-02-05 23:33:44 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-02-05 23:33:44 +0100
commit1adcc5fd23004cd7253c87134c30d853e1b3b8b8 (patch)
treebbe413e10172b95eb71cb402ca65b8fc99c793d6 /lib/base.php
parent5221ee0c5aaca5588e20683f397fec9d1d6e98c7 (diff)
downloadnextcloud-server-1adcc5fd23004cd7253c87134c30d853e1b3b8b8.tar.gz
nextcloud-server-1adcc5fd23004cd7253c87134c30d853e1b3b8b8.zip
basic WebDAV test in place now
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index 90e64f13af6..6dab980dd0e 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -546,6 +546,29 @@ class OC {
require_once 'core/setup.php';
exit();
}
+
+ // post installation checks
+ if (!OC_Config::getValue("post-installation-checked", false)) {
+ // setup was successful -> webdav testing now
+ $request = OC_Request::getPathInfo();
+ if(substr($request, -4) !== '.css' and substr($request, -3) !== '.js' and substr($request, -5) !== '.json') {
+ if (OC_Util::isWebDAVWorking()) {
+ OC_Config::setValue("post-installation-checked", true);
+ } 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();
+ }
+ }
+ }
+
+
$request = OC_Request::getPathInfo();
if(substr($request, -3) !== '.js'){// we need these files during the upgrade
self::checkMaintenanceMode();