summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-01-22 12:30:17 -0800
committerTim Almdal <tnalmdal@shaw.ca>2010-01-22 12:30:17 -0800
commitdf313cac567bee77f5a73308381fe67dcac9b92c (patch)
treeee3c72b035d3d9f9d7d005de6fc32128994e7f12 /modules
parentdabd5b84b21c711592a1f3bcd2ca298dd6d7fde2 (diff)
Change the check_environment method in the module helper and the module installers to can_activate to reflect that it is doing more than just checking the environment.
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/controllers/admin_modules.php2
-rw-r--r--modules/gallery/helpers/module.php8
-rw-r--r--modules/slideshow/helpers/slideshow_installer.php2
-rw-r--r--modules/user/helpers/user_installer.php2
4 files changed, 7 insertions, 7 deletions
diff --git a/modules/gallery/controllers/admin_modules.php b/modules/gallery/controllers/admin_modules.php
index 46defbef..a2168280 100644
--- a/modules/gallery/controllers/admin_modules.php
+++ b/modules/gallery/controllers/admin_modules.php
@@ -42,7 +42,7 @@ class Admin_Modules_Controller extends Admin_Controller {
if ($info->active && !$desired && module::is_active($module_name)) {
$messages = array_merge($messages, module::can_deactivate($module_name));
} else if (!$info->active && $desired && !module::is_active($module_name)) {
- $messages = array_merge($messages, module::check_environment($module_name));
+ $messages = array_merge($messages, module::can_activate($module_name));
}
}
diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php
index 595f600b..f680ff6a 100644
--- a/modules/gallery/helpers/module.php
+++ b/modules/gallery/helpers/module.php
@@ -120,17 +120,17 @@ class module_Core {
}
/**
- * Check that the module can be installed. (i.e. all the prerequistes exist)
+ * Check that the module can be activated. (i.e. all the prerequistes exist)
* @param string $module_name
* @return array an array of warning or error messages to be displayed
*/
- static function check_environment($module_name) {
+ static function can_activate($module_name) {
module::_add_to_path($module_name);
$messages = array();
$installer_class = "{$module_name}_installer";
- if (method_exists($installer_class, "check_environment")) {
- $messages = call_user_func(array($installer_class, "check_environment"));
+ if (method_exists($installer_class, "can_activate")) {
+ $messages = call_user_func(array($installer_class, "can_activate"));
}
// Remove it from the active path
diff --git a/modules/slideshow/helpers/slideshow_installer.php b/modules/slideshow/helpers/slideshow_installer.php
index 319e2e79..8d612f3e 100644
--- a/modules/slideshow/helpers/slideshow_installer.php
+++ b/modules/slideshow/helpers/slideshow_installer.php
@@ -34,7 +34,7 @@ class slideshow_installer {
site_status::clear("slideshow_needs_rss");
}
- static function check_environment() {
+ static function can_activate() {
$messages = array();
if (!module::is_active("rss")) {
$messages["warn"][] = t("The Slideshow module requires the RSS module.");
diff --git a/modules/user/helpers/user_installer.php b/modules/user/helpers/user_installer.php
index 3882f5f2..38f8020b 100644
--- a/modules/user/helpers/user_installer.php
+++ b/modules/user/helpers/user_installer.php
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class user_installer {
- static function check_environment() {
+ static function can_activate() {
return array("warn" => array(IdentityProvider::confirmation_message()));
}