From 9648be97fbc60167493726d2180c25e26ff90919 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Sat, 13 Aug 2011 05:37:12 +0200 Subject: [PATCH] better error messages for installation, still need to be inline --- lib/setup.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/setup.php b/lib/setup.php index c7259d6b8c..8386846358 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -37,13 +37,13 @@ class OC_Setup { $dbtype = $options['dbtype']; if(empty($options['adminlogin'])) { - $error[] = 'STEP 1 : admin login is not set.'; + $error[] = 'Set an admin username.'; } if(empty($options['adminpass'])) { - $error[] = 'STEP 1 : admin password is not set.'; + $error[] = 'Set an admin password.'; } if(empty($options['directory'])) { - $error[] = 'STEP 2 : data directory path is not set.'; + $error[] = 'Specify a data folder.'; } if($dbtype=='mysql' or $dbtype=='pgsql') { //mysql and postgresql needs more config options @@ -53,19 +53,19 @@ class OC_Setup { $dbprettyname = 'PostgreSQL'; if(empty($options['dbuser'])) { - $error[] = "STEP 3 : $dbprettyname database user is not set."; + $error[] = "$dbprettyname enter the database username."; } if(empty($options['dbpass'])) { - $error[] = "STEP 3 : $dbprettyname database password is not set."; + $error[] = "$dbprettyname enter the database password."; } if(empty($options['dbname'])) { - $error[] = "STEP 3 : $dbprettyname database name is not set."; + $error[] = "$dbprettyname enter the database name."; } if(empty($options['dbhost'])) { - $error[] = "STEP 3 : $dbprettyname database host is not set."; + $error[] = "$dbprettyname set the database host."; } if(!isset($options['dbtableprefix'])) { - $error[] = "STEP 3 : $dbprettyname database table prefix is not set."; + $error[] = "$dbprettyname set a table prefix."; } } @@ -97,8 +97,8 @@ class OC_Setup { $connection = @mysql_connect($dbhost, $dbuser, $dbpass); if(!$connection) { $error[] = array( - 'error' => 'mysql username and/or password not valid', - 'hint' => 'you need to enter either an existing account, or the administrative account if you wish to create a new user for ownCloud' + 'error' => 'MySQL username and/or password not valid', + 'hint' => 'You need to enter either an existing account or the administrator.' ); } else { @@ -151,8 +151,8 @@ class OC_Setup { $connection = @pg_connect($connection_string); if(!$connection) { $error[] = array( - 'error' => 'postgresql username and/or password not valid', - 'hint' => 'you need to enter either an existing account, or the administrative account if you wish to create a new user for ownCloud' + 'error' => 'PostgreSQL username and/or password not valid', + 'hint' => 'You need to enter either an existing account or the administrator.' ); } else {