Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Issue forks
automatic_updates-3242724
Commits
77939597
Commit
77939597
authored
Jul 08, 2019
by
heddn
Committed by
heddn
Jul 08, 2019
Browse files
Issue
#3063134
by heddn, tatarbj: Backport PendingDbUpdates
parent
dce1e81f
Changes
3
Hide whitespace changes
Inline
Side-by-side
ReadinessCheckers/PendingDbUpdates.php
0 → 100644
View file @
77939597
<?php
/**
* Pending database updates checker.
*/
class
PendingDbUpdates
implements
ReadinessCheckerInterface
{
/**
* {@inheritdoc}
*/
public
static
function
run
()
{
$messages
=
[];
if
(
static
::
areDbUpdatesPending
())
{
$messages
[]
=
t
(
'There are pending database updates, therefore updates cannot be applied. Please run update.php.'
);
}
return
$messages
;
}
/**
* Checks if there are pending database updates.
*
* @return bool
* TRUE if there are pending updates, otherwise FALSE.
*/
protected
static
function
areDbUpdatesPending
()
{
require_once
DRUPAL_ROOT
.
'/includes/install.inc'
;
require_once
DRUPAL_ROOT
.
'/includes/update.inc'
;
drupal_load_updates
();
return
(
bool
)
update_get_update_list
();
}
}
ReadinessCheckers/ReadinessCheckerManager.php
View file @
77939597
...
...
@@ -28,6 +28,7 @@ class ReadinessCheckerManager {
static
::
$checkers
[
'warning'
][
0
][]
=
'ModifiedFiles'
;
static
::
$checkers
[
'warning'
][
0
][]
=
'PhpSapi'
;
static
::
$checkers
[
'error'
][
0
][]
=
'DiskSpace'
;
static
::
$checkers
[
'error'
][
0
][]
=
'PendingDbUpdates'
;
static
::
$checkers
[
'error'
][
0
][]
=
'ReadOnlyFilesystem'
;
return
static
::
$checkers
;
...
...
automatic_updates.info
View file @
77939597
...
...
@@ -15,5 +15,6 @@ files[] = ReadinessCheckers/DiskSpace.php
files
[]
=
ReadinessCheckers
/
FileOwnership
.
php
files
[]
=
ReadinessCheckers
/
MissingProjectInfo
.
php
files
[]
=
ReadinessCheckers
/
ModifiedFiles
.
php
files
[]
=
ReadinessCheckers
/
PendingDbUpdates
.
php
files
[]
=
ReadinessCheckers
/
PhpSapi
.
php
files
[]
=
ReadinessCheckers
/
ReadOnlyFilesystem
.
php
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