summaryrefslogtreecommitdiff
path: root/installer/helpers/installer.php
diff options
context:
space:
mode:
Diffstat (limited to 'installer/helpers/installer.php')
-rw-r--r--installer/helpers/installer.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/installer/helpers/installer.php b/installer/helpers/installer.php
index 9214060d..640e4335 100644
--- a/installer/helpers/installer.php
+++ b/installer/helpers/installer.php
@@ -274,6 +274,15 @@ class installer {
"error" => false);
}
+ $tables = self::$database->list_tables(self::$config["dbname"]);
+
+ $valid = count($tables) == 0;
+ if (!$valid) {
+ $db_config_valid = false;
+ $section["msgs"]["Database Empty"] = array("text" => "Database '$dbname' is not empty",
+ "error" => true);
+ }
+
$missing = array();
$rights = self::$database->get_access_rights($dbname);
@@ -292,7 +301,6 @@ class installer {
"error" => false);
}
-
self::$messages[] = $section;
return $db_config_valid;
@@ -314,7 +322,7 @@ class installer {
"error" => true);
}
self::$messages[] = $section;
- return $writable;
+ return !$writable;
}
private static function _render($view) {