You are here

function quotes_block_list in Quotes 6

Quotes block information.

1 call to quotes_block_list()
quotes_block in ./quotes.module
Implementation of hook_block().

File

./quotes.module, line 772
The quotes module allows users to maintain a list of quotes that can be displayed in any number of administrator-defined quote blocks.

Code

function quotes_block_list() {
  $blocks = array();
  $result = db_query('SELECT qb.bid, qb.name, qb.block_type FROM {quotes_blocks} qb');
  while ($block = db_fetch_object($result)) {
    $blocks[$block->bid] = array(
      'info' => t('Quotes') . ': ' . $block->name,
      'cache' => $block->block_type == 0 ? BLOCK_NO_CACHE : BLOCK_CACHE_PER_ROLE,
    );
  }
  return $blocks;
}