mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-23 07:15:50 -04:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user