From 886cc50e75cc045bfce6e655a169f996b0cd5f5c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 1 Dec 2009 00:39:35 +0000 Subject: =?UTF-8?q?-=20Patch=20#491214=20by=20JohnAlbin,=20G=C3=A1bor=20Ho?= =?UTF-8?q?jtsy,=20eigentor:=20implement=20a=20more=20usable=20top=20level?= =?UTF-8?q?=20Appearance=20page.=20Yay.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/update/update.module | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'modules/update') 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() */ -- cgit v1.2.3