From f39cf6ed2f43706ef13e67353ea7e43f5d09b7a8 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 23 Nov 2008 07:46:50 +0000 Subject: Add a button to install all plugins at once, now that we have so many. Improve the style a bit, sort the plugins, put core first and make it stand out so that you don't accidentally uninstall it. --- core/controllers/welcome.php | 21 +++++++++++---------- core/views/welcome.html.php | 12 ++++++++++++ core/views/welcome_syscheck.html.php | 9 +++++++++ 3 files changed, 32 insertions(+), 10 deletions(-) (limited to 'core') diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php index cf8f6693..80aa2f8c 100644 --- a/core/controllers/welcome.php +++ b/core/controllers/welcome.php @@ -42,21 +42,21 @@ class Welcome_Controller extends Template_Controller { } function install($module_name) { - call_user_func(array("{$module_name}_installer", "install")); + if ($module_name == "*") { + foreach ($this->_read_modules() as $module_name => $version) { + if (empty($version)) { + call_user_func(array("${module_name}_installer", "install")); + } + } + } else { + call_user_func(array("{$module_name}_installer", "install")); + } + url::redirect("welcome"); } function uninstall($module_name) { if ($module_name == "core") { - // Legacy support for uninstalling the auth module and removing the blocks table - try { - $db = Database::instance(); - $db->query("DROP TABLE IF EXISTS `passwords`;"); - ORM::factory("module")->where("name", "auth")->find()->delete(); - $db->query("DROP TABLE IF EXISTS `blocks`;"); - } catch (Exception $e) { - } - // We have to uninstall all other modules first, else their tables, etc don't // get cleaned up. foreach (ORM::factory("module")->find_all() as $module) { @@ -292,6 +292,7 @@ class Welcome_Controller extends Template_Controller { } catch (Exception $e) { // The database may not be installed } + ksort($modules); return $modules; } } diff --git a/core/views/welcome.html.php b/core/views/welcome.html.php index a3f70d33..41578935 100644 --- a/core/views/welcome.html.php +++ b/core/views/welcome.html.php @@ -106,6 +106,18 @@ display: inline; } + tr.core td { + border-bottom: 1px solid black; + + } + + a { + text-decoration: none; + } + + a:hover { + text-decoration: underline; + } diff --git a/core/views/welcome_syscheck.html.php b/core/views/welcome_syscheck.html.php index 7d972689..e469a724 100644 --- a/core/views/welcome_syscheck.html.php +++ b/core/views/welcome_syscheck.html.php @@ -35,7 +35,13 @@ Version Action + + core + + + $module_version): ?> + @@ -49,6 +55,9 @@ + + + -- cgit v1.2.3