You are here

function apachesolr_mlt_settings in Apache Solr Search 5

function apachesolr_mlt_settings() returns the settings page.

1 string reference to 'apachesolr_mlt_settings'
apachesolr_mlt_menu in contrib/apachesolr_mlt/apachesolr_mlt.module
Implementation of hook_menu()

File

contrib/apachesolr_mlt/apachesolr_mlt.module, line 111

Code

function apachesolr_mlt_settings() {
  $query = "SELECT * FROM {apachesolr_mlt}";
  $results = db_query($query);
  $rows = array();
  while ($block = db_fetch_object($results)) {
    $block->data = unserialize($block->data);
    $rows[] = array(
      $block->id,
      $block->data['name'],
      l('Edit', 'admin/settings/apachesolr_mlt/configure_block/' . check_plain($block->id)) . ' | ' . l('Delete', 'admin/settings/apachesolr_mlt/delete_block/' . check_plain($block->id)),
    );
  }
  $header = array(
    t('Id'),
    t('name'),
    t('options'),
  );
  $output = l(t('Add block'), 'admin/settings/apachesolr_mlt/configure_block');
  $output .= theme('table', $header, $rows);
  return $output;
}