Index: chessboard.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/chessboard/chessboard.module,v
retrieving revision 1.72
diff -u -p -r1.72 chessboard.module
--- chessboard.module	15 Nov 2010 20:30:32 -0000	1.72
+++ chessboard.module	21 Nov 2010 12:16:07 -0000
@@ -23,10 +23,12 @@ function chessboard_help($path, $arg) {
  * Implementation of hook_init().
  */
 function chessboard_init() {
+  $formats = array();
   $result = db_query('SELECT * FROM {filter_formats}');
   while ($format = db_fetch_object($result)) {
-    _chessboard_filter_add_structures($format);
+    $formats[$format->format] = $format;
   }
+  _chessboard_filter_add_structures($formats);
 }
 
 /**
@@ -324,14 +326,16 @@ function _chessboard_filter_callback($ma
   return $output;
 }
 
-function _chessboard_filter_add_structures($format) {
-  if (filter_format_allowcache($format->format)) {
-    $list = cache_get($format->format . ':chessboard-filter-attached-cids', 'cache_filter');
-    if (isset($list->data)) {
-      foreach ($list->data as $cid => $status) {
-        $cache = cache_get($cid, 'cache_filter');
-        if (isset($cache->data['#attached'])) {
-          chessboard_process_attached($cache->data);
+function _chessboard_filter_add_structures($formats) {
+  foreach ($formats as $format) {
+    if ($format->cache) {
+      $list = cache_get($format->format . ':chessboard-filter-attached-cids', 'cache_filter');
+      if (isset($list->data)) {
+        foreach ($list->data as $cid => $status) {
+          $cache = cache_get($cid, 'cache_filter');
+          if (isset($cache->data['#attached'])) {
+            chessboard_process_attached($cache->data);
+          }
         }
       }
     }
