Skip to content
Snippets Groups Projects
Commit 2113f47a authored by Jakob P's avatar Jakob P
Browse files

Drupal 10 Compatibility, Fix Issue #3164275.

parent 4202c4c7
No related branches found
No related tags found
No related merge requests found
......@@ -2,9 +2,6 @@
"name": "drupal/update_notifications_disable",
"type": "drupal-module",
"license": "GPL-2.0-or-later",
"require": {
"drupal/core": "^8 || ^9"
},
"extra": {
"branch-alias": {
"dev-8.x-1.x": "1.x-dev"
......
name: 'Update Notification Disable'
type: module
description: "Turns off core's update notification and removes warning about the Update status module not being enabled."
core: 8.x
core_version_requirement: ^8 || ^9
core_version_requirement: '>=8.9 <11.0.0-stable'
package: Other
hidden: true
<?php
/**
* Implements hook_install().
*
* Ensure that the Available releases array is empty so it never checks them.
*/
function update_notifications_disable_install($is_syncing) {
\Drupal::keyValueExpirable('update_available_releases')->deleteAll();
\Drupal::keyValueExpirable('update_available_releases')->setMultiple([]);
}
\ No newline at end of file
......@@ -9,5 +9,17 @@
* Implements hook_update_projects_alter().
*/
function update_notifications_disable_update_projects_alter(&$projects) {
\Drupal::keyValueExpirable('update_available_releases')->deleteAll();
\Drupal::keyValueExpirable('update_available_releases')->setMultiple([]);
$projects = [];
}
/**
* Implements hook_cron().
*
* Make sure that when cron runs, available data is not fetched.
*/
function update_notifications_disable_cron() {
\Drupal::keyValueExpirable('update_available_releases')->deleteAll();
\Drupal::keyValueExpirable('update_available_releases')->setMultiple([]);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment