function db_maintenance_menu in DB Maintenance 5
Same name and namespace in other branches
- 8.2 db_maintenance.module \db_maintenance_menu()
- 5.2 db_maintenance.module \db_maintenance_menu()
- 6.2 db_maintenance.module \db_maintenance_menu()
- 6 db_maintenance.module \db_maintenance_menu()
- 7.2 db_maintenance.module \db_maintenance_menu()
- 7 db_maintenance.module \db_maintenance_menu()
Implementation of hook_menu().
Parameters
$may_cache boolean:
Return value
array
File
- ./
db_maintenance.module, line 51 - Optimizes database tables during cron runs.
Code
function db_maintenance_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/settings/db_maintenance',
'title' => t('DB maintenance'),
'description' => t('Executes a cron-based OPTIMIZE TABLE query on MyISAM, InnoDB, or BerkeleyDB database tables.'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'db_maintenance_admin_settings',
),
'access' => user_access('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
);
$items[] = array(
'path' => 'db_maintenance/optimize',
'title' => t('Optimize tables'),
'callback' => 'db_maintenance_optimize_tables_page',
'access' => user_access('administer site configuration'),
'type' => MENU_CALLBACK,
);
}
return $items;
}