function block_flush_caches

7.x block.module block_flush_caches()
6.x block.module block_flush_caches()

Implementation of hook_flush_caches().

File

drupal-6.x/modules/block/block.module, line 318
Controls the boxes that are displayed around the main content.

Code

function block_flush_caches() {
  // Rehash blocks for active themes. We don't use list_themes() here,
  // because if MAINTENANCE_MODE is defined it skips reading the database,
  // and we can't tell which themes are active.
  $result = db_query("SELECT name FROM {system} WHERE type = 'theme' AND status = 1");
  while ($theme = db_result($result)) {
    _block_rehash($theme);
  }
}