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.
This commit is contained in:
kondou 2013-04-13 15:56:01 +02:00
parent f9e7d4ce25
commit d759dca203
2 changed files with 2 additions and 1 deletions

View File

@ -63,6 +63,7 @@
<div id="datadirContent">
<label for="directory"><?php p($l->t( 'Data folder' )); ?></label>
<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'])); ?>" />
</div>
</fieldset>

View File

@ -37,7 +37,7 @@ class OC_Setup {
$error[] = $l->t('Set an admin password.');
}
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