summaryrefslogtreecommitdiff
path: root/modules/update/update.module
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-01-22 03:11:54 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-01-22 03:11:54 +0000
commitb4c737a2a5ed9bf9905c91107f94e42df36f2c44 (patch)
tree8bed38a803bf4f1c8dc1e657f42abe9cc2fd952d /modules/update/update.module
parent7ac380aa059bd901e7965445080d2fddef84f9e9 (diff)
downloadbrdo-b4c737a2a5ed9bf9905c91107f94e42df36f2c44.tar.gz
brdo-b4c737a2a5ed9bf9905c91107f94e42df36f2c44.tar.bz2
#287178 by justinrandell: Break up various hook_form_alter()s to hook_form_FORM_ID_alters().
Diffstat (limited to 'modules/update/update.module')
-rw-r--r--modules/update/update.module20
1 files changed, 15 insertions, 5 deletions
diff --git a/modules/update/update.module b/modules/update/update.module
index 8952f6e55..d103f0431 100644
--- a/modules/update/update.module
+++ b/modules/update/update.module
@@ -286,17 +286,27 @@ function update_cron() {
}
/**
- * Implementation of hook_form_alter().
+ * Implementation of hook_form_FORM_ID_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 update_invalidate_cache()
*/
-function update_form_alter(&$form, $form_state, $form_id) {
- if ($form_id == 'system_modules' || $form_id == 'system_themes' ) {
- $form['#submit'][] = 'update_invalidate_cache';
- }
+function update_form_system_themes_alter(&$form, $form_state) {
+ $form['#submit'][] = 'update_invalidate_cache';
+}
+
+/**
+ * Implementation of hook_form_FORM_ID_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 update_invalidate_cache()
+ */
+function update_form_system_modules_alter(&$form, $form_state) {
+ $form['#submit'][] = 'update_invalidate_cache';
}
/**