From 12a900de2539a31b0bbfbba9ffa861fb0f36e8cd Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 31 Jan 2014 16:57:49 +0100 Subject: [PATCH] Do setup default value handling in the controller not the template --- core/setup/controller.php | 12 +++++++++++- core/templates/installation.php | 16 ++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/core/setup/controller.php b/core/setup/controller.php index 0c87103138..5189aba2f3 100644 --- a/core/setup/controller.php +++ b/core/setup/controller.php @@ -33,11 +33,21 @@ class Controller { } public function display($post) { + $defaults = array( + 'adminlogin' => '', + 'adminpass' => '', + 'dbuser' => '', + 'dbpass' => '', + 'dbname' => '', + 'dbtablespace' => '', + 'dbhost' => '', + ); + $parameters = array_merge($defaults, $post); \OC_Util::addScript( '3rdparty', 'strengthify/jquery.strengthify' ); \OC_Util::addStyle( '3rdparty', 'strengthify/strengthify' ); \OC_Util::addScript('setup'); - \OC_Template::printGuestPage('', 'installation', $post); + \OC_Template::printGuestPage('', 'installation', $parameters); } public function finishSetup() { diff --git a/core/templates/installation.php b/core/templates/installation.php index 182fc83a4d..7e216d0ee9 100644 --- a/core/templates/installation.php +++ b/core/templates/installation.php @@ -48,13 +48,13 @@ t( 'Create an admin account' )); ?>

+ value="" autocomplete="off" autofocus required />

+ value="" required /> @@ -75,7 +75,7 @@ " - value="" /> + value="" /> @@ -149,11 +149,11 @@

+ value="" autocomplete="off" />

+ value="" /> @@ -161,7 +161,7 @@

@@ -169,14 +169,14 @@

+ value="" autocomplete="off" />

+ value="" />