diff options
author | ideaship <ideaship@users.noreply.github.com> | 2014-03-13 20:05:11 +0100 |
---|---|---|
committer | ideaship <ideaship@users.noreply.github.com> | 2014-03-13 20:05:11 +0100 |
commit | a5425e84f2c93a80a1e6d43fdde9dd655090d557 (patch) | |
tree | e6b2d52f7739fadb103fcea65c7fb18cd9588296 /core/setup | |
parent | a7695b8dd099302fc0c080642c9dc9d288c9665f (diff) | |
download | nextcloud-server-a5425e84f2c93a80a1e6d43fdde9dd655090d557.tar.gz nextcloud-server-a5425e84f2c93a80a1e6d43fdde9dd655090d557.zip |
fix autoconfig
In array_merge, $post overrides $opts (concerns data directory).
Always merge $post before calling display().
Default value for dbtype which may still be undefined in display().
Fixes several problems related to autoconfig:
- installation.php only showed $AUTOCONFIG data if it was called after
install() had come back with errors
- if autoconfig.php was set, installation.php showed an editable field
with the wrong data in it; then, regardless of any changes, the value
from autoconfig.php was used
- installation.php used undefined indeces (dbtype, dbIsSet,
directoryIsSet)
Diffstat (limited to 'core/setup')
-rw-r--r-- | core/setup/controller.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/setup/controller.php b/core/setup/controller.php index 697408cfb57..1233f326f1d 100644 --- a/core/setup/controller.php +++ b/core/setup/controller.php @@ -20,7 +20,7 @@ class Controller { $errors = array('errors' => $e); if(count($e) > 0) { - $options = array_merge($post, $opts, $errors); + $options = array_merge($opts, $post, $errors); $this->display($options); } else { @@ -28,7 +28,8 @@ class Controller { } } else { - $this->display($opts); + $options = array_merge($opts, $post); + $this->display($options); } } @@ -41,6 +42,7 @@ class Controller { 'dbname' => '', 'dbtablespace' => '', 'dbhost' => '', + 'dbtype' => '', ); $parameters = array_merge($defaults, $post); |