You are here

function ultimate_cron_menu_alter in Ultimate Cron 8

Same name and namespace in other branches
  1. 6 ultimate_cron.module \ultimate_cron_menu_alter()
  2. 7.2 ultimate_cron.module \ultimate_cron_menu_alter()
  3. 7 ultimate_cron.module \ultimate_cron_menu_alter()

Implements hook_menu_alter().

Steal the run-cron, so when you "run cron manually" from the status-reports page the ultimate_cron cron handler is run.

File

./ultimate_cron.module, line 677
@todo Add filter on overview page. @todo Add log view (with graph). @todo Make proper markup for overview page. @todo Refactor drush stuff, too many intimate relations with Background Process @todo Refactor Cron % offset stuff. Too mixed up and…

Code

function ultimate_cron_menu_alter(&$items) {
  if (_ultimate_cron_incompatible_modules()) {
    return;
  }
  $items['admin/config/system/cron'] = array(
    'title' => 'Cron',
    'description' => 'View and manage cron table',
    'page callback' => 'ultimate_cron_view_page',
    'access arguments' => array(
      'administer ultimate cron',
    ),
    'module' => 'ultimate_cron',
    'file' => 'ultimate_cron.admin.inc',
  );
  $items['admin/config/system/cron/overview'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $steal =& $items['admin/reports/status/run-cron'];
  $steal['page callback'] = 'ultimate_cron_run_cron';
  $steal['page arguments'] = array();
  $steal['module'] = 'ultimate_cron';
  $steal['file'] = 'ultimate_cron.admin.inc';
}