cvs diff: Diffing modules/update Index: modules/update/update.compare.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/update/update.compare.inc,v retrieving revision 1.22 diff -u -p -r1.22 update.compare.inc --- modules/update/update.compare.inc 6 Jun 2009 16:05:28 -0000 1.22 +++ modules/update/update.compare.inc 13 Jun 2009 05:47:52 -0000 @@ -36,8 +36,14 @@ function update_get_projects() { $projects = update_project_cache('update_project_projects'); if (empty($projects)) { // Still empty, so we have to rebuild the cache. - _update_process_info_list($projects, system_get_module_data(), 'module'); - _update_process_info_list($projects, system_get_theme_data(), 'theme'); + $module_data = system_get_module_data(); + $theme_data = system_get_theme_data(); + _update_process_info_list($projects, $module_data, 'module'); + _update_process_info_list($projects, $theme_data, 'theme'); + if (variable_get('update_check_disabled', FALSE)) { + _update_process_info_list($projects, $module_data, 'disabled-module'); + _update_process_info_list($projects, $theme_data, 'disabled-theme'); + } // Allow other modules to alter projects before fetching and comparing. drupal_alter('update_projects', $projects); // Cache the site's project data for at most 1 hour. @@ -51,9 +57,10 @@ function update_get_projects() { * Populate an array of project data. */ function _update_process_info_list(&$projects, $list, $project_type) { + // Based on the project_type, select the project status we should consider. + $project_status = strpos($project_type, 'disabled') === FALSE ? 1 : 0; foreach ($list as $file) { - if (empty($file->status)) { - // Skip disabled modules or themes. + if ($file->status != $project_status) { continue; } @@ -96,7 +103,10 @@ function _update_process_info_list(&$pro 'project_type' => $project_name == 'drupal' ? 'core' : $project_type, ); } - else { + // Only record include data if the project is of the same type. This + // prevents listing all the disabled modules included with an enabled + // project if we happen to be checking for disabled modules, too. + elseif ($projects[$project_name]['project_type'] == $project_type) { $projects[$project_name]['includes'][$file->name] = $file->info['name']; $projects[$project_name]['info']['_info_file_ctime'] = max($projects[$project_name]['info']['_info_file_ctime'], $file->info['_info_file_ctime']); } Index: modules/update/update.settings.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/update/update.settings.inc,v retrieving revision 1.6 diff -u -p -r1.6 update.settings.inc --- modules/update/update.settings.inc 29 Apr 2009 03:57:21 -0000 1.6 +++ modules/update/update.settings.inc 13 Jun 2009 05:47:52 -0000 @@ -43,6 +43,12 @@ function update_settings() { '#description' => t('You can choose to send e-mail only if a security update is available, or to be notified about all newer versions. If there are updates available of Drupal core or any of your installed modules and themes, your site will always print a message on the status report page, and will also display an error message on administration pages if there is a security update.', array('@status_report' => url('admin/reports/status'))) ); + $form['update_check_disabled'] = array( + '#type' => 'checkbox', + '#title' => t('Check for updates of disabled modules and themes'), + '#default_value' => variable_get('update_check_disabled', FALSE), + ); + $form = system_settings_form($form, FALSE); // Custom validation callback for the email notification setting. $form['#validate'][] = 'update_settings_validate';