diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-01-06 10:11:03 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-01-06 10:11:03 -0800 |
commit | 7778d4c05075e67f096d3d5365e5ae35e1b0a737 (patch) | |
tree | b3121dd92e8e70d41b5a6a4bc81d8d35112f5714 /installer/web.php | |
parent | c5d14438959346551765757a506689a7d8b13665 (diff) |
Provide an error message when the sql in installer::empty_db fails. Also change the show tables not to specify a database as it will use the database in the active connection. Fixes ticket #963.
Diffstat (limited to 'installer/web.php')
-rw-r--r-- | installer/web.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/installer/web.php b/installer/web.php index 65233b31..90143afb 100644 --- a/installer/web.php +++ b/installer/web.php @@ -46,8 +46,12 @@ if (installer::already_installed()) { $content = render("invalid_db_version.html.php"); } else if (!installer::select_db($config)) { $content = render("missing_db.html.php"); - } else if (!installer::db_empty($config)) { - $content = render("db_not_empty.html.php"); + } else if (is_string($count = installer::db_empty($config)) || !$count) { + if (is_string($count)) { + $content = oops($count); + } else { + $content = render("db_not_empty.html.php"); + } } else if (!installer::unpack_var()) { $content = oops("Unable to create files inside the <code>var</code> directory"); } else if (!installer::unpack_sql($config)) { |