You are here

function apachesolr_mlt_list_blocks in Apache Solr Search 5

Same name and namespace in other branches
  1. 5.2 apachesolr.module \apachesolr_mlt_list_blocks()
  2. 6 apachesolr.module \apachesolr_mlt_list_blocks()
  3. 6.2 apachesolr.module \apachesolr_mlt_list_blocks()

function apachesolr_mlt_list_blocks() returns a list of blocks. used by hook_block

1 call to apachesolr_mlt_list_blocks()
apachesolr_mlt_block in contrib/apachesolr_mlt/apachesolr_mlt.module
Implementation of hook_block

File

contrib/apachesolr_mlt/apachesolr_mlt.module, line 329

Code

function apachesolr_mlt_list_blocks() {
  $block_results = db_query("SELECT * FROM {apachesolr_mlt}");
  $blocks = array();
  while ($block = db_fetch_object($block_results)) {
    $block->data = unserialize($block->data);
    $blocks[$block->id] = array(
      'info' => t('ApacheSolr recommendations: ') . $block->data['name'],
    );
  }
  return $blocks;
}