Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
288
Merge Requests
288
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
729a23e1
Commit
729a23e1
authored
Nov 23, 2010
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#922788
by sun: update.php does not invoke hook_requirements()('update') in all modules.
parent
7aab0ab3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
17 deletions
+22
-17
modules/system/system.api.php
modules/system/system.api.php
+17
-15
update.php
update.php
+5
-2
No files found.
modules/system/system.api.php
View file @
729a23e1
...
...
@@ -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': t
he 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': t
he 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: T
he 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: T
he 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
();
...
...
update.php
View file @
729a23e1
...
...
@@ -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 @@ function update_check_requirements() {
update_fix_compatibility
();
// Check the update requirements for all modules.
update_check_requirements
();
$op
=
isset
(
$_REQUEST
[
'op'
])
?
$_REQUEST
[
'op'
]
:
''
;
switch
(
$op
)
{
// update.php ops.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment