]> source.dussan.org Git - nextcloud-server.git/commitdiff
Handle empty datafolder better.
authorkondou <kondou@ts.unde.re>
Sat, 13 Apr 2013 13:56:01 +0000 (15:56 +0200)
committerkondou <kondou@ts.unde.re>
Sat, 13 Apr 2013 13:56:01 +0000 (15:56 +0200)
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.

core/templates/installation.php
lib/setup.php

index c70903cba552ae4f3a3d2c6f3ba37be830161fe1..79510042307c92194baad7cd148f94e900edfcbf 100644 (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>
index 7082f0b2afd4dc19e9596ed3694b1c22a0e10c92..769fae11656c33dc79338aac83d282c56e2c2bf3 100644 (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