From 7008bfb5c3b0654d7d25b2e0d0d53d09e4431c0c Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 13 May 2009 00:32:19 +0000 Subject: Warn the user if they're attemping to reinstall into a database that already has Gallery 3 tables. Otherwise, permit it to continue. We key this off of the existence of the g3_items table. Theoretically it's possible that the g3_items table is gone but other tables are still there, which could mess things up. I'm not going to worry about that for now. Fixes ticket #175 --- installer/cli.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'installer/cli.php') diff --git a/installer/cli.php b/installer/cli.php index a853f67b..199172dc 100644 --- a/installer/cli.php +++ b/installer/cli.php @@ -37,8 +37,9 @@ if (!installer::connect($config)) { oops("Database {$config['dbname']} doesn't exist and can't be created. " . "Please create the database by hand."); } else if (!installer::db_empty($config)) { - oops("Database {$config['dbname']} already has tables in it. " . - "Please specify an empty database.\n"); + oops("Database {$config['dbname']} already has Gallery 3 tables in it. \n" . + " Please remove the Gallery 3 tables, change your prefix,\n" . + " or specify an empty database.\n"); } else if (!installer::unpack_var()) { oops("Unable to create files inside the 'var' directory"); } else if (!installer::unpack_sql($config)) { -- cgit v1.2.3