? .svn
? 355938.patch
? generate_stylesheet.inc
? garland/.svn
? translations/.svn
Index: vertical_tabs.install
===================================================================
RCS file: /cvs/drupal/contributions/modules/vertical_tabs/vertical_tabs.install,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 vertical_tabs.install
--- vertical_tabs.install	11 Jan 2009 01:09:21 -0000	1.1.2.4
+++ vertical_tabs.install	12 Jan 2009 22:22:29 -0000
@@ -38,7 +38,10 @@ function vertical_tabs_install_color_gen
       $theme = 'garland';
       $info = color_get_info($theme);
       $palette = color_get_palette($theme);
+
+      // vertical_tabs.module is not loaded when hook_update_n() is invoked.
+      module_load_include('inc', 'vertical_tabs', 'generate_stylesheet');
       vertical_tabs_generate_stylesheet('garland', $info, $palette);
     }
   }
-}
\ No newline at end of file
+}
Index: vertical_tabs.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/vertical_tabs/vertical_tabs.module,v
retrieving revision 1.1.2.15
diff -u -p -r1.1.2.15 vertical_tabs.module
--- vertical_tabs.module	6 Jan 2009 03:47:04 -0000	1.1.2.15
+++ vertical_tabs.module	12 Jan 2009 22:22:30 -0000
@@ -185,47 +185,11 @@ function vertical_tabs_color_submit($for
     }
   }
 
+  module_load_include('inc', 'vertical_tabs', 'generate_stylesheet');
   vertical_tabs_generate_stylesheet($theme, $info, $palette);
 }
 
 /**
- * Color module support for Garland and Vertical Tabs.
- *
- * Most of this function is direct copy/paste from color_scheme_form_submit().
- */
-function vertical_tabs_generate_stylesheet($theme, $info, $palette) {
-  // Current CSS files.
-  $css = variable_get('color_'. $theme .'_stylesheets', array());
-  $files = variable_get('color_'. $theme .'_files', array());
-
-  // Template file.
-  $file = 'vertical_tabs.garland.css';
-
-  // Prepare target locations for generated files.
-  $paths['color'] = file_directory_path() .'/color';
-  $paths['source'] = drupal_get_path('module', 'vertical_tabs') .'/garland/';
-  $paths['files'] = $paths['map'] = array();
-
-  if (count($css)) {
-    $paths['id'] = preg_replace('/^.*?('. $theme .'-[a-zA-Z0-9]+).*?$/', '$1', $css[0]);
-    $paths['target'] = $paths['color'] .'/'. $paths['id'] .'/';
-
-    $style = drupal_load_stylesheet($paths['source'] . $file, FALSE);
-
-    // Rewrite stylesheet with new colors.
-    $style = _color_rewrite_stylesheet($theme, $info, $paths, $palette, $style);
-    $base_file = basename($file);
-    $css[] = $paths['target'] . $base_file;
-    $files[] = $paths['target'] . $base_file;
-    _color_save_stylesheet($paths['target'] . $base_file, $style, $paths);
-
-    // Update the list of files.
-    variable_set('color_'. $theme .'_stylesheets', $css);
-    variable_set('color_'. $theme .'_files', $files);
-  }
-}
-
-/**
  * Retrieve the default set of enabled fieldsets that support vertical tabs.
  */
 function vertical_tabs_fieldsets($node_type) {
