You are here

function block_flush_caches in Block Cache Alter 6

Same name in this branch
  1. 6 patches/block_with_node_grants.module \block_flush_caches()
  2. 6 patches/block_no_node_grants.module \block_flush_caches()

Implementation of hook_flush_caches().

File

patches/block_no_node_grants.module, line 314
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);
  }
}