| 1 |
<?php |
<?php |
| 2 |
// $Id: luceneapi.module,v 1.62 2009/11/15 19:22:13 cpliakas Exp $ |
// $Id: luceneapi.module,v 1.63 2009/11/16 03:14:34 cpliakas Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @defgroup luceneapi Search Lucene API |
* @defgroup luceneapi Search Lucene API |
| 215 |
$items = array(); |
$items = array(); |
| 216 |
|
|
| 217 |
// administrative settings |
// administrative settings |
| 218 |
$items['admin/settings/luceneapi'] = array( |
$items['admin/config/search/luceneapi'] = array( |
| 219 |
'title' => '!name', |
'title' => '!name', |
| 220 |
'title arguments' => array('!name' => 'Search Lucene API'), |
'title arguments' => array('!name' => 'Search Lucene API'), |
| 221 |
'description' => 'Configure error handling, API behavior.', |
'description' => 'Configure error handling, API behavior.', |
| 229 |
// builds menu items for each Search Lucene API module |
// builds menu items for each Search Lucene API module |
| 230 |
$files = system_rebuild_module_data(); |
$files = system_rebuild_module_data(); |
| 231 |
foreach (luceneapi_module_list() as $module) { |
foreach (luceneapi_module_list() as $module) { |
| 232 |
$items['admin/settings/'. $module] = array( |
$items['admin/config/search/'. $module] = array( |
| 233 |
'title' => '!name', |
'title' => '!name', |
| 234 |
'title arguments' => array('!name' => $files[$module]->info['name']), |
'title arguments' => array('!name' => $files[$module]->info['name']), |
| 235 |
'page callback' => 'drupal_get_form', |
'page callback' => 'drupal_get_form', |
| 242 |
$menu_type = NULL; |
$menu_type = NULL; |
| 243 |
foreach (luceneapi_menu_local_task_paths_get() as $path => $title) { |
foreach (luceneapi_menu_local_task_paths_get() as $path => $title) { |
| 244 |
$menu_type = (NULL === $menu_type) ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK; |
$menu_type = (NULL === $menu_type) ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK; |
| 245 |
$items['admin/settings/'. $module .'/'. $path] = array( |
$items['admin/config/search/'. $module .'/'. $path] = array( |
| 246 |
'title' => $title, |
'title' => $title, |
| 247 |
'page callback' => 'drupal_get_form', |
'page callback' => 'drupal_get_form', |
| 248 |
'page arguments' => array($module .'_admin_settings_'. $path .'_form'), |
'page arguments' => array($module .'_admin_settings_'. $path .'_form'), |
| 256 |
|
|
| 257 |
// callbacks for buttons in the admin section that execute admin tasks |
// callbacks for buttons in the admin section that execute admin tasks |
| 258 |
foreach (luceneapi_admin_tasks_get() as $task => $title) { |
foreach (luceneapi_admin_tasks_get() as $task => $title) { |
| 259 |
$items['admin/settings/'. $module .'/'. $task] = array( |
$items['admin/config/search/'. $module .'/'. $task] = array( |
| 260 |
'title' => $title, |
'title' => $title, |
| 261 |
'page callback' => 'drupal_get_form', |
'page callback' => 'drupal_get_form', |
| 262 |
'page arguments' => array('luceneapi_admin_confirm', $module, $task), |
'page arguments' => array('luceneapi_admin_confirm', $module, $task), |