You are here

function auditfiles_menu in Audit Files 5

Same name and namespace in other branches
  1. 6.3 auditfiles.module \auditfiles_menu()
  2. 6.2 auditfiles.module \auditfiles_menu()
  3. 7.4 auditfiles.module \auditfiles_menu()
  4. 7.3 auditfiles.module \auditfiles_menu()

Implementation of hook_menu().

File

./auditfiles.module, line 45

Code

function auditfiles_menu($may_cache) {
  $items = array();
  $access = user_access('access file audits');
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/logs/auditfiles',
      'title' => t('Audit files'),
      'description' => t('Perform an audit of the file system.'),
      'access' => $access,
      'type' => MENU_ITEM_GROUPING,
      'weight' => 10,
    );
    $items[] = array(
      'path' => 'admin/logs/auditfiles/notindb',
      'title' => t('Not in database'),
      'description' => t('List files that are on the server, but not in the database.'),
      'callback' => 'auditfiles_notindb',
      'access' => $access,
    );
    $items[] = array(
      'path' => 'admin/logs/auditfiles/notonserver',
      'title' => t('Not on server'),
      'description' => t('List files that are in the database, but not on the server.'),
      'callback' => 'auditfiles_notonserver',
      'access' => $access,
    );
    $items[] = array(
      'path' => 'admin/settings/auditfiles',
      'title' => 'Audit files',
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'auditfiles_admin_settings',
      ),
      'access' => user_access('administer file audits'),
      'type' => MENU_NORMAL_ITEM,
      'description' => t('Set file, extension and path exclusions for file audits.'),
    );
  }
  return $items;
}