? thickbox.module_2.patch
Index: thickbox.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/thickbox/thickbox.module,v
retrieving revision 1.9.2.8
diff -u -r1.9.2.8 thickbox.module
--- thickbox.module	8 Feb 2008 08:45:13 -0000	1.9.2.8
+++ thickbox.module	24 Apr 2008 23:17:03 -0000
@@ -154,12 +154,11 @@
 function thickbox_field_formatter_info() {
   $formatter = array();
   if (module_exists('imagefield') && module_exists('imagecache')) {
-    $rules = _imagecache_get_presets();
-    foreach ($rules as $ruleid => $rulename) {
-      $formatters['thickbox]['. $rulename] = array(
-        'label' => 'Thickbox: '. $rulename,
+    foreach (imagecache_presets() as $preset) {
+      $formatters['thickbox]['. $preset['presetname']] = array(
+        'label' => 'Thickbox: '. $preset['presetname'],
         'field types' => array('image'),
-        );
+      );
     }
   }
 
@@ -174,8 +173,7 @@
     $file = _imagefield_file_load($item['fid']);
     if (strpos($formatter, 'thickbox][') !== false) {
       list($null, $namespace) = explode('][', $formatter, 2);
-      $rules = _imagecache_get_presets();
-      if (in_array($namespace, (array) $rules)) {
+      if ($preset = imagecache_preset_by_name($namespace)) {
         return theme('imagefield_image_imagecache_thickbox', $namespace, $field, $file['filepath'], $item['alt'], $item['title']);
       }
     }
