diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-10 16:54:47 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-10 16:54:47 +0000 |
commit | 29b4b91a9a220bd462eab6320cf16a2ddf4be112 (patch) | |
tree | 4f1dba1a22bf6dcda05036ee2cc3ed72f567abf8 | |
parent | 84b6401dc8cdc8cb3d9233e436ed22187a7dc3e5 (diff) | |
download | elgg-29b4b91a9a220bd462eab6320cf16a2ddf4be112.tar.gz elgg-29b4b91a9a220bd462eab6320cf16a2ddf4be112.tar.bz2 |
better error messages when there are already Elgg database tables in the database
git-svn-id: http://code.elgg.org/elgg/trunk@7046 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | install/ElggInstaller.php | 6 | ||||
-rw-r--r-- | install/languages/en.php | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php index 687a5bcab..192139084 100644 --- a/install/ElggInstaller.php +++ b/install/ElggInstaller.php @@ -1130,7 +1130,11 @@ class ElggInstaller { try { run_sql_script("{$CONFIG->path}engine/schema/mysql.sql"); } catch (Exception $e) { - register_error($e->getMessage()); + $msg = $e->getMessage(); + if (strpos($msg, 'already exists')) { + $msg = elgg_echo('install:error:tables_exist'); + } + register_error($msg); return FALSE; } diff --git a/install/languages/en.php b/install/languages/en.php index 577d5ddbc..f474a8c7b 100644 --- a/install/languages/en.php +++ b/install/languages/en.php @@ -57,7 +57,7 @@ If you are ready to proceed, click the Next button.", 'install:check:database' => 'The database requirements are checked when Elgg loads its database.', 'install:database:instructions' => "If you haven't already created a database for Elgg, do that now. Then fill in the values below to initialize the Elgg database.", - 'install:database:error' => 'There was an error creating the Elgg database and installation cannot continue. Review the message above and correct any problems. If you need more help, visit the Install Troubleshooting link below, or post to the Elgg community forums.', + 'install:database:error' => 'There was an error creating the Elgg database and installation cannot continue. Review the message above and correct any problems. If you need more help, visit the Install troubleshooting link below or post to the Elgg community forums.', 'install:database:label:dbuser' => 'Database Username', 'install:database:label:dbpassword' => 'Database Password', @@ -121,6 +121,7 @@ If you are ready to proceed, click the Next button.", 'install:error:databasesettings' => 'Unable to connect to the database with these settings.', 'install:error:oldmysql' => 'MySQL must be version 5.0 or above. Your server is using %s.', 'install:error:nodatabase' => 'Unable to use database %s. It may not exist.', + 'install:error:tables_exist' => 'There are already Elgg tables in the database. You need to either drop those tables or restart the installer and we will attempt to use them. To restart the installer, remove \'?step=database\' from the URL in your browser\'s address bar and press Enter.', 'install:error:readsettingsphp' => 'Unable to read engine/settings.example.php', 'install:error:writesettingphp' => 'Unable to write engine/settings.php', 'install:error:requiredfield' => '%s is required', |