1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
Author: Alexandre De Dommelin <adedommelin@tuxz.net>
Description: Remove warnings about available Drupal core updates
--- a/modules/update/update.fetch.inc
+++ b/modules/update/update.fetch.inc
@@ -152,12 +152,10 @@
$status = update_requirements('runtime');
$params = array();
$notify_all = (variable_get('update_notification_threshold', 'all') == 'all');
- foreach (array('core', 'contrib') as $report_type) {
- $type = 'update_'. $report_type;
- if (isset($status[$type]['severity'])
- && ($status[$type]['severity'] == REQUIREMENT_ERROR || ($notify_all && $status[$type]['reason'] == UPDATE_NOT_CURRENT))) {
- $params[$report_type] = $status[$type]['reason'];
- }
+
+ if (isset($status['update_contrib']['severity'])
+ && ($status['update_contrib']['severity'] == REQUIREMENT_ERROR || ($notify_all && $status['update_contrib']['reason'] == UPDATE_NOT_CURRENT))) {
+ $params['contrib'] = $status['update_contrib']['reason'];
}
if (!empty($params)) {
$notify_list = variable_get('update_notify_emails', '');
--- a/modules/update/update.module
+++ b/modules/update/update.module
@@ -73,15 +73,13 @@
case 'admin/build/modules':
include_once './includes/install.inc';
$status = update_requirements('runtime');
- foreach (array('core', 'contrib') as $report_type) {
- $type = 'update_'. $report_type;
- if (isset($status[$type]['severity'])) {
- if ($status[$type]['severity'] == REQUIREMENT_ERROR) {
- drupal_set_message($status[$type]['description'], 'error');
- }
- elseif ($status[$type]['severity'] == REQUIREMENT_WARNING) {
- drupal_set_message($status[$type]['description'], 'warning');
- }
+
+ if (isset($status['update_contrib']['severity'])) {
+ if ($status['update_contrib']['severity'] == REQUIREMENT_ERROR) {
+ drupal_set_message($status['update_contrib']['description'], 'error');
+ }
+ elseif ($status['update_contrib']['severity'] == REQUIREMENT_WARNING) {
+ drupal_set_message($status['update_contrib']['description'], 'warning');
}
}
return '<p>'. t('See the <a href="@available_updates">available updates</a> page for information on installed modules and themes with new versions released.', array('@available_updates' => url('admin/reports/updates'))) .'</p>';
@@ -202,7 +200,7 @@
module_load_include('inc', 'update', 'update.compare');
$data = update_calculate_project_data($available);
// First, populate the requirements for core:
- $requirements['update_core'] = _update_requirement_check($data['drupal'], 'core');
+ //$requirements['update_core'] = _update_requirement_check($data['drupal'], 'core');
// We don't want to check drupal a second time.
unset($data['drupal']);
if (!empty($data)) {
--- a/modules/update/update.report.inc
+++ b/modules/update/update.report.inc
@@ -222,6 +222,13 @@
'disabled-theme' => t('Disabled themes'),
);
foreach ($project_types as $type_name => $type_label) {
+ if ( $type_name == "core" ) {
+ $deb_message = array( array('class' => 'info','data' => array("Drupal core updates (including security patches) are applied by your sysadmin through the Debian package management system, you don't need to manually download them.")));
+ $output .= "\n<h3>". $type_label ."</h3>\n";
+ $output .= theme('table', $header, $deb_message,array('class' => 'update'));
+ continue;
+ }
+
if (!empty($rows[$type_name])) {
ksort($rows[$type_name]);
$output .= "\n<h3>". $type_label ."</h3>\n";
|