Skip to content
Snippets Groups Projects

Issue #3292933: UpdateREady from also needs to check for updates in themes

Merged Issue #3292933: UpdateREady from also needs to check for updates in themes
All threads resolved!
All threads resolved!
3 files
+ 42
41
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 7
21
@@ -107,14 +107,14 @@ class UpdateReady extends FormBase {
@@ -107,14 +107,14 @@ class UpdateReady extends FormBase {
$messages = [];
$messages = [];
// If there are any installed modules with database updates in the staging
// If there are any installed extensions with database updates in the
// area, warn the user that they might be sent to update.php once the
// staging area, warn the user that they might be sent to update.php once
// staged changes have been applied.
// the staged changes have been applied.
$pending_updates = $this->getModulesWithStagedDatabaseUpdates();
$pending_updates = $this->stagedDatabaseUpdateValidator->getExtensionsWithDatabaseUpdates($this->updater);
if ($pending_updates) {
if ($pending_updates) {
$messages[MessengerInterface::TYPE_WARNING][] = $this->t('Possible database updates were detected in the following modules; you may be redirected to the database update page in order to complete the update process.');
$messages[MessengerInterface::TYPE_WARNING][] = $this->t('Possible database updates were detected in the following extensions; you may be redirected to the database update page in order to complete the update process.');
foreach ($pending_updates as $info) {
foreach ($pending_updates as $pending_update) {
$messages[MessengerInterface::TYPE_WARNING][] = $info['name'];
$messages[MessengerInterface::TYPE_WARNING][] = $pending_update;
}
}
}
}
@@ -181,20 +181,6 @@ class UpdateReady extends FormBase {
@@ -181,20 +181,6 @@ class UpdateReady extends FormBase {
return $form;
return $form;
}
}
/**
* Returns info for all installed modules that have staged database updates.
*
* @return array[]
* The info arrays for the modules which have staged database updates, keyed
* by module machine name.
*/
protected function getModulesWithStagedDatabaseUpdates(): array {
$filter = function (string $name): bool {
return $this->stagedDatabaseUpdateValidator->hasStagedUpdates($this->updater, $this->moduleList->get($name));
};
return array_filter($this->moduleList->getAllInstalledInfo(), $filter, ARRAY_FILTER_USE_KEY);
}
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*/
*/
Loading