function update_form_alter

6.x update.module update_form_alter(&$form, $form_state, $form_id)

Implementation of hook_form_alter().

Adds a submit handler to the system modules and themes forms, so that if a site admin saves either form, we invalidate the cache of available updates.

See also

update_invalidate_cache()

File

drupal-6.x/modules/update/update.module, line 314
The "Update status" module checks for available updates of Drupal core and any installed contributed modules and themes. It warns site administrators if newer releases are available via the system status report (admin/reports/status), theā€¦

Code

function update_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'system_modules' || $form_id == 'system_themes_form') {
    $form['#submit'][] = 'update_invalidate_cache';
  }
}