]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
better error messages when there are already Elgg database tables in the database
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 10 Oct 2010 16:54:47 +0000 (16:54 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 10 Oct 2010 16:54:47 +0000 (16:54 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7046 36083f99-b078-4883-b0ff-0f9b5a30f544

install/ElggInstaller.php
install/languages/en.php

index 687a5bcab01dd764c90028c664e2a4197b3a1993..19213908454a7860065b2bdaa01cf0d970132d4c 100644 (file)
@@ -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;
                }
 
index 577d5ddbc8ce4e6a21e716ec6fcb15f90d23846d..f474a8c7bfa166c80155d0e6378ed05f8e5797cf 100644 (file)
@@ -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',