summaryrefslogtreecommitdiff
path: root/installer/cli.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-07 10:41:19 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-07 10:41:19 -0800
commitc711bf1b1fcf7840467a7a044b1f511e7b69c139 (patch)
treeee84a16b5ce4448fd41ba7ffa2cb2381b225e206 /installer/cli.php
parent31454d37b3ea02104925f1976609576c5f09c0c6 (diff)
parent10c05c855a1634a60048a52e8d90bc51f187ede7 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Diffstat (limited to 'installer/cli.php')
-rw-r--r--installer/cli.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/installer/cli.php b/installer/cli.php
index f736ffcb..e88293ff 100644
--- a/installer/cli.php
+++ b/installer/cli.php
@@ -41,10 +41,14 @@ if (!installer::connect($config)) {
} else if (!installer::select_db($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 Gallery 3 tables in it. \n" .
- " Please remove the Gallery 3 tables, change your prefix,\n" .
- " or specify an empty database.\n");
+} else if (is_string($count = installer::db_empty($config)) || !$count) {
+ if (is_string($count)) {
+ oops($count);
+ } else {
+ 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)) {