summaryrefslogtreecommitdiff
path: root/modules/update
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-12-01 00:39:35 +0000
committerDries Buytaert <dries@buytaert.net>2009-12-01 00:39:35 +0000
commit886cc50e75cc045bfce6e655a169f996b0cd5f5c (patch)
treeec9149e625ad3d8f37ef6bd1fd0ba8b3019bad9e /modules/update
parent3db9fc144cbf8e5d5687c6c90b9526680de67364 (diff)
downloadbrdo-886cc50e75cc045bfce6e655a169f996b0cd5f5c.tar.gz
brdo-886cc50e75cc045bfce6e655a169f996b0cd5f5c.tar.bz2
- Patch #491214 by JohnAlbin, Gábor Hojtsy, eigentor: implement a more usable top level Appearance page. Yay.
Diffstat (limited to 'modules/update')
-rw-r--r--modules/update/update.module24
1 files changed, 16 insertions, 8 deletions
diff --git a/modules/update/update.module b/modules/update/update.module
index 20f6dbe75..5527472a6 100644
--- a/modules/update/update.module
+++ b/modules/update/update.module
@@ -396,22 +396,30 @@ function update_cron() {
}
/**
- * Implement hook_form_FORM_ID_alter().
+ * Implement hook_themes_enabled().
*
- * 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.
+ * If themes are enabled, we invalidate the cache of available updates.
+ */
+function update_themes_enabled($themes) {
+ // Clear all update module caches.
+ _update_cache_clear();
+}
+
+/**
+ * Implement hook_themes_disabled().
*
- * @see _update_cache_clear()
+ * If themes are disabled, we invalidate the cache of available updates.
*/
-function update_form_system_themes_form_alter(&$form, $form_state) {
- $form['#submit'][] = 'update_cache_clear_submit';
+function update_themes_disabled($themes) {
+ // Clear all update module caches.
+ _update_cache_clear();
}
/**
* Implement 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.
+ * Adds a submit handler to the system modules form, so that if a site admin
+ * saves the form, we invalidate the cache of available updates.
*
* @see _update_cache_clear()
*/