Index: modules/views/views.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/views.module,v retrieving revision 1.166.2.40 diff -u -p -r1.166.2.40 views.module --- modules/views/views.module 5 May 2007 02:40:18 -0000 1.166.2.40 +++ modules/views/views.module 10 May 2007 18:32:31 -0000 @@ -22,12 +22,6 @@ function views_menu($may_cache) { if ($may_cache) { views_load_cache(); - // Invalidate the views cache to ensure that views data gets rebuilt. - // This is the best way to tell that module configuration has changed. - if (arg(0) == 'admin' && arg(2) == 'modules') { - views_invalidate_cache(); - } - views_menu_standard_items($items); } else { @@ -2117,7 +2111,10 @@ function views_taxonomy($op, $type, $obj } function views_form_alter($form_id, &$form) { - if ($form_id == 'profile_field_form') { + if ($form_id == 'profile_field_form' || $form_id == 'system_modules') { + // Invalidate the views cache to ensure that views data gets rebuilt. + // We need to do this on every visit to admin/build/modules since + // there's no better way to tell when module configuration changes. views_invalidate_cache(); } }