summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-05 06:27:02 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-05 06:27:02 +0000
commitbda84d71eb7a52ba29d4d1434a21bac476124877 (patch)
tree4771e1b44393d9d42d1e6bfa25dc6ab8c2a91cf9 /core
parent89787fa8ab53d68b0790f7c06f8887a5ea207337 (diff)
Fix a bug where any uninstall removed the entire database.
Diffstat (limited to 'core')
-rw-r--r--core/controllers/welcome.php18
1 files changed, 8 insertions, 10 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php
index 1d2082d4..7f1070ba 100644
--- a/core/controllers/welcome.php
+++ b/core/controllers/welcome.php
@@ -104,18 +104,16 @@ class Welcome_Controller extends Template_Controller {
}
}
} catch (Exception $e) { }
- }
- call_user_func(array("{$module_name}_installer", "uninstall"));
-
- $clean = false;
- if (!$clean) {
- // Since we're in a state of flux, it's possible that other stuff went wrong with the
- // uninstall, so back off and nuke things from orbit.
- $db = Database::instance();
- foreach ($db->list_tables() as $table) {
- $db->query("DROP TABLE `$table`");
+ if (!$clean) {
+ // Since we're in a state of flux, it's possible that other stuff went wrong with the
+ // uninstall, so back off and nuke things from orbit.
+ $db = Database::instance();
+ foreach ($db->list_tables() as $table) {
+ $db->query("DROP TABLE `$table`");
+ }
}
}
+ call_user_func(array("{$module_name}_installer", "uninstall"));
url::redirect("welcome");
}