You are here

function hacked_menu in Hacked! 6.2

Same name and namespace in other branches
  1. 5 hacked.module \hacked_menu()
  2. 6 hacked.module \hacked_menu()
  3. 7.3 hacked.module \hacked_menu()
  4. 7.2 hacked.module \hacked_menu()

Implementation of hook_menu().

File

./hacked.module, line 25
The Hacked! module, shows which project have been changed since download.

Code

function hacked_menu() {
  $items = array();
  $items['admin/reports/hacked'] = array(
    'title' => 'Hacked',
    'description' => 'Get a code hacking report about your installed modules and themes.',
    'page callback' => 'hacked_reports_hacked',
    'access arguments' => array(
      'administer site configuration',
    ),
    'weight' => 10,
    'file' => 'hacked.report.inc',
  );
  $items['admin/reports/hacked/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'hacked_settings_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'hacked.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/reports/hacked/list'] = array(
    'title' => 'List projects',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/reports/hacked/rebuild-report'] = array(
    'type' => MENU_CALLBACK,
    'page callback' => 'hacked_reports_rebuild',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'hacked.report.inc',
  );
  $items['admin/reports/hacked/%hacked_project'] = array(
    'title callback' => 'hacked_reports_hacked_details_title',
    'title arguments' => array(
      3,
    ),
    'page callback' => 'hacked_reports_hacked_details',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'hacked.details.inc',
  );
  if (module_exists('diff')) {
    $items['admin/reports/hacked/%hacked_project/diff/%hacked_tail'] = array(
      'title callback' => 'hacked_reports_hacked_diff_title',
      'title arguments' => array(
        3,
        5,
      ),
      'load arguments' => array(
        '%map',
        '%index',
      ),
      'page callback' => 'hacked_reports_hacked_diff',
      'page arguments' => array(
        3,
        5,
      ),
      'access arguments' => array(
        'view diffs of changed files',
      ),
      'type' => MENU_CALLBACK,
      'file' => 'hacked.diff.inc',
    );
  }
  return $items;
}