Only in d6: .DS_Store
Only in d6: files
Only in d6/modules: .DS_Store
diff -r -u -F'^function' drupal-6.0-beta4/modules/system/system.admin.inc d6/modules/system/system.admin.inc
--- drupal-6.0-beta4/modules/system/system.admin.inc 2007-12-05 11:12:59.000000000 -0800
+++ d6/modules/system/system.admin.inc 2007-12-12 00:53:55.000000000 -0800
@@ -1962,7 +1962,18 @@ function theme_system_modules($form) {
}
$row[] = drupal_render($form['version'][$key]);
+
+ $class = '';
+ if (module_exists('update')) {
+ if ($module['update_status'] == UPDATE_NOT_SECURE
+ || $module['update_status'] == UPDATE_NOT_CURRENT) {
+ $class = 'error update';
+ $status = theme('update_version_status', $module['update_status'], array('url_fragment' => $module['project']));
+ $description = $status . $description;
+ }
+ }
$row[] = array('data' => $description, 'class' => 'description');
+ $row = array('data' => $row, 'class' => $class);
$rows[] = $row;
}
$fieldset = array(
diff -r -u -F'^function' drupal-6.0-beta4/modules/update/update.module d6/modules/update/update.module
--- drupal-6.0-beta4/modules/update/update.module 2007-12-02 08:43:59.000000000 -0800
+++ d6/modules/update/update.module 2007-12-12 00:16:35.000000000 -0800
@@ -57,11 +57,17 @@ function update_help($path, $arg) {
foreach (array('core', 'contrib') as $report_type) {
$type = 'update_'. $report_type;
if (isset($status[$type]['severity'])) {
+ $description = $status[$type]['description'];
+ if ($available = update_get_available(TRUE)) {
+ include_once './modules/update/update.compare.inc';
+ $data = update_calculate_project_data($available);
+ $description .= theme('update_module_list', $data);
+ }
if ($status[$type]['severity'] == REQUIREMENT_ERROR) {
- drupal_set_message($status[$type]['description'], 'error');
+ drupal_set_message($description, 'error');
}
elseif ($status[$type]['severity'] == REQUIREMENT_WARNING) {
- drupal_set_message($status[$type]['description']);
+ drupal_set_message($description);
}
}
}
@@ -153,6 +159,12 @@ function update_theme() {
'update_version' => array(
'arguments' => array('version' => NULL, 'tag' => NULL, 'class' => NULL),
),
+ 'update_module_list' => array(
+ 'arguments' => array('data' => NULL),
+ ),
+ 'update_version_status' => array(
+ 'arguments' => array('status' => UPDATE_CURRENT, 'options' => NULL),
+ ),
);
}
@@ -266,6 +278,19 @@ function update_form_alter(&$form, $form
if ($form_id == 'system_modules' || $form_id == 'system_themes' ) {
$form['#submit'][] = 'update_invalidate_cache';
}
+ if ($form_id == 'system_modules') {
+ if ($available = update_get_available(TRUE)) {
+ include_once './modules/update/update.compare.inc';
+ $data = update_calculate_project_data($available);
+ }
+ if (isset($data)) {
+ foreach ($data as $project) {
+ foreach ($project['includes'] as $module => $title) {
+ $form['validation_modules']['#value'][$module]->info['update_status'] = $project['status'];
+ }
+ }
+ }
+ }
}
/**
@@ -393,3 +418,70 @@ function _update_message_text($msg_type,
return $text;
}
+
+function theme_update_module_list($data) {
+ if (!is_array($data)) {
+ return $data;
+ }
+ $projects = array();
+ foreach ($data as $project) {
+ if ($project['status'] == UPDATE_NOT_SECURE
+ || $project['status'] == UPDATE_NOT_CURRENT) {
+ $title = isset($project['title']) ? $project['title'] : $project['name'];
+ $projects[] = l($title, 'admin/reports/updates', array('fragment' => $project['name']));
+ }
+ }
+ return theme('item_list', $projects);
+}
+
+function theme_update_version_status($status = UPDATE_CURRENT, $options = NULL) {
+ $notification_level = variable_get('update_notification_threshold', 'all');
+ switch ($status) {
+ case UPDATE_CURRENT:
+ $icon = theme('image', 'misc/watchdog-ok.png');
+ break;
+ case UPDATE_NOT_SECURE:
+ case UPDATE_NOT_CURRENT:
+ if ($notification_level == 'all'
+ || $status == UPDATE_NOT_SECURE) {
+ $icon = theme('image', 'misc/watchdog-error.png');
+ break;
+ }
+ // Otherwise, deliberate no break and use the warning icon.
+ default:
+ $icon = theme('image', 'misc/watchdog-warning.png');
+ break;
+ }
+
+ $output = '<div class="version-status">';
+ $text = '';
+ switch ($status) {
+ case UPDATE_CURRENT:
+ $text .= t('Up to date');
+ break;
+ case UPDATE_NOT_SECURE:
+ $text .= '<span class="security-error">';
+ $text .= t('Security update required!');
+ $text .= '</span>';
+ break;
+ case UPDATE_NOT_CURRENT:
+ $text .= t('Update available');
+ break;
+ default:
+ if (isset($options['reason'])) {
+ $text .= check_plain($options['reason']);
+ }
+ break;
+ }
+ if (isset($options['url_fragment'])) {
+ $output .= l($text, 'admin/reports/updates', array('html' => TRUE, 'fragment' => $options['url_fragment']));
+ }
+ else {
+ $output .= $text;
+ }
+ $output .= '<span class="icon">'. $icon .'</span>';
+ $output .= "</div>\n";
+
+ drupal_add_css(drupal_get_path('module', 'update') .'/update.css');
+ return $output;
+}
diff -r -u -F'^function' drupal-6.0-beta4/modules/update/update.report.inc d6/modules/update/update.report.inc
--- drupal-6.0-beta4/modules/update/update.report.inc 2007-10-20 14:57:50.000000000 -0700
+++ d6/modules/update/update.report.inc 2007-12-12 00:15:11.000000000 -0800
@@ -36,51 +36,32 @@ function theme_update_report($data) {
$header = array();
$rows = array();
-
+
$notification_level = variable_get('update_notification_threshold', 'all');
- foreach ($data as $project) {
+ foreach ($data as $project) {
switch ($project['status']) {
case UPDATE_CURRENT:
$class = 'ok';
- $icon = theme('image', 'misc/watchdog-ok.png');
break;
case UPDATE_NOT_SECURE:
case UPDATE_NOT_CURRENT:
if ($notification_level == 'all'
|| $project['status'] == UPDATE_NOT_SECURE) {
$class = 'error';
- $icon = theme('image', 'misc/watchdog-error.png');
break;
}
- // Otherwise, deliberate no break and use the warning class/icon.
+ // Otherwise, deliberate no break and use the warning class.
default:
$class = 'warning';
- $icon = theme('image', 'misc/watchdog-warning.png');
break;
}
-
- $row = '<div class="version-status">';
- switch ($project['status']) {
- case UPDATE_CURRENT:
- $row .= t('Up to date');
- break;
- case UPDATE_NOT_SECURE:
- $row .= '<span class="security-error">';
- $row .= t('Security update required!');
- $row .= '</span>';
- break;
- case UPDATE_NOT_CURRENT:
- $row .= t('Update available');
- break;
- default:
- $row .= check_plain($project['reason']);
- break;
- }
- $row .= '<span class="icon">'. $icon .'</span>';
- $row .= "</div>\n";
+
+ $reason = (isset($project['reason'])) ? $project['reason'] : NULL;
+ $row = theme('update_version_status', $project['status'], array('reason' => $reason));
$row .= '<div class="project">';
+ $row .= '<a name="'. check_plain($project['name']) .'"></a>';
if (isset($project['title'])) {
if (isset($project['link'])) {
$row .= l($project['title'], $project['link']);
Only in d6/sites: .DS_Store
Only in d6/sites/all: .DS_Store
Only in d6/sites/all: modules
Only in d6/sites/default: settings.php