diff options
-rw-r--r-- | modules/system/system.api.php | 32 | ||||
-rw-r--r-- | update.php | 7 |
2 files changed, 22 insertions, 17 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 8b9163e6e..4079c613f 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -2692,7 +2692,8 @@ function hook_file_url_alter(&$uri) { } } } - /** + +/** * Check installation requirements and do status reporting. * * This hook has two closely related uses, determined by the $phase argument: @@ -2726,24 +2727,25 @@ function hook_file_url_alter(&$uri) { * result in a notice on the the administration overview page. * * @param $phase - * The phase in which hook_requirements is run: - * - 'install': the module is being installed. - * - 'runtime': the runtime requirements are being checked and shown on the - * status report page. + * The phase in which requirements are checked: + * - install: The module is being installed. + * - update: The module is enabled and update.php is run. + * - runtime: The runtime requirements are being checked and shown on the + * status report page. * * @return * A keyed array of requirements. Each requirement is itself an array with * the following items: - * - 'title': the name of the requirement. - * - 'value': the current value (e.g. version, time, level, ...). During - * install phase, this should only be used for version numbers, do not set - * it if not applicable. - * - 'description': description of the requirement/status. - * - 'severity': the requirement's result/severity level, one of: - * - REQUIREMENT_INFO: For info only. - * - REQUIREMENT_OK: The requirement is satisfied. - * - REQUIREMENT_WARNING: The requirement failed with a warning. - * - REQUIREMENT_ERROR: The requirement failed with an error. + * - title: The name of the requirement. + * - value: The current value (e.g., version, time, level, etc). During + * install phase, this should only be used for version numbers, do not set + * it if not applicable. + * - description: The description of the requirement/status. + * - severity: The requirement's result/severity level, one of: + * - REQUIREMENT_INFO: For info only. + * - REQUIREMENT_OK: The requirement is satisfied. + * - REQUIREMENT_WARNING: The requirement failed with a warning. + * - REQUIREMENT_ERROR: The requirement failed with an error. */ function hook_requirements($phase) { $requirements = array(); diff --git a/update.php b/update.php index a9bc48b8d..1dd7cd618 100644 --- a/update.php +++ b/update.php @@ -308,8 +308,8 @@ function update_extra_requirements($requirements = NULL) { * Check update requirements and report any errors. */ function update_check_requirements() { - // Check the system module and update.php requirements only. - $requirements = module_invoke('system', 'requirements', 'update'); + // Check requirements of all loaded modules. + $requirements = module_invoke_all('requirements', 'update'); $requirements += update_extra_requirements(); $severity = drupal_requirements_severity($requirements); @@ -398,6 +398,9 @@ if (update_access_allowed()) { update_fix_compatibility(); + // Check the update requirements for all modules. + update_check_requirements(); + $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : ''; switch ($op) { // update.php ops. |