update_form_alter

Versions
6
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()

Code

modules/update/update.module, line 314

<?php
function update_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'system_modules' || $form_id == 'system_themes_form' ) {
    $form['#submit'][] = 'update_invalidate_cache';
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.