You are here

function db_maintenance_menu in DB Maintenance 7

Same name and namespace in other branches
  1. 8.2 db_maintenance.module \db_maintenance_menu()
  2. 5.2 db_maintenance.module \db_maintenance_menu()
  3. 5 db_maintenance.module \db_maintenance_menu()
  4. 6.2 db_maintenance.module \db_maintenance_menu()
  5. 6 db_maintenance.module \db_maintenance_menu()
  6. 7.2 db_maintenance.module \db_maintenance_menu()

Implements hook_menu().

Return value

array

File

./db_maintenance.module, line 69
Optimizes database tables during cron runs.

Code

function db_maintenance_menu() {
  $items = array();
  $items['admin/config/system/db_maintenance'] = array(
    'title' => 'DB maintenance',
    'description' => 'Executes a cron-based query to optimize database tables.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'db_maintenance_admin_settings',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer db maintenance',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'db_maintenance.admin.inc',
  );
  $items['db_maintenance/optimize'] = array(
    'page callback' => 'db_maintenance_optimize_tables_page',
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer db maintenance',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}