diff options
Diffstat (limited to 'installer/helpers')
-rw-r--r-- | installer/helpers/installer.php | 12 |
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) { |