You are here

function legal_menu in Legal 5

Same name and namespace in other branches
  1. 6.8 legal.module \legal_menu()
  2. 6.7 legal.module \legal_menu()
  3. 7.2 legal.module \legal_menu()
  4. 7 legal.module \legal_menu()

File

./legal.module, line 27

Code

function legal_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/legal',
      'title' => t('Legal'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'legal_administration',
      ),
      'access' => user_access('administer Terms and Conditions'),
      'description' => t('Display Terms and Conditions statement on the registration page.'),
    );
    $items[] = array(
      'path' => 'legal',
      'title' => t('Terms and Conditions'),
      'callback' => 'legal_page',
      'access' => user_access('view Terms and Conditions'),
      'type' => MENU_CALLBACK,
    );
  }
  else {
    $items[] = array(
      'path' => 'legal_accept',
      'title' => t('Terms and Conditions'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'legal_login',
      ),
      'access' => TRUE,
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}