|
|
|
@ -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(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|