Skip to content
Snippets Groups Projects
Commit d759dca2 authored by Christopher Schäpers's avatar Christopher Schäpers
Browse files

Handle empty datafolder better.

If datafolder is erased, the default value will be shown as a placeholder.

If installation is submitted without a datafolder the default value will be used.
parent f9e7d4ce
No related branches found
No related tags found
No related merge requests found
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
<div id="datadirContent"> <div id="datadirContent">
<label for="directory"><?php p($l->t( 'Data folder' )); ?></label> <label for="directory"><?php p($l->t( 'Data folder' )); ?></label>
<input type="text" name="directory" id="directory" <input type="text" name="directory" id="directory"
placeholder="<?php p(OC_Helper::init_var('directory', $_['directory'])); ?>"
value="<?php p(OC_Helper::init_var('directory', $_['directory'])); ?>" /> value="<?php p(OC_Helper::init_var('directory', $_['directory'])); ?>" />
</div> </div>
</fieldset> </fieldset>
......
...@@ -37,7 +37,7 @@ class OC_Setup { ...@@ -37,7 +37,7 @@ class OC_Setup {
$error[] = $l->t('Set an admin password.'); $error[] = $l->t('Set an admin password.');
} }
if(empty($options['directory'])) { if(empty($options['directory'])) {
$error[] = $l->t('Specify a data folder.'); $options['directory'] = OC::$SERVERROOT."/data";
} }
if($dbtype == 'mysql' or $dbtype == 'pgsql' or $dbtype == 'oci' or $dbtype == 'mssql') { //mysql and postgresql needs more config options if($dbtype == 'mysql' or $dbtype == 'pgsql' or $dbtype == 'oci' or $dbtype == 'mssql') { //mysql and postgresql needs more config options
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment