You are here

function feedback_menu in Feedback 5.2

Same name and namespace in other branches
  1. 5 feedback.module \feedback_menu()
  2. 6.2 feedback.module \feedback_menu()
  3. 7.2 feedback.module \feedback_menu()

Implementation of hook_menu().

File

./feedback.module, line 18
Allows site visitors and users to report issues about this site.

Code

function feedback_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/logs/feedback',
      'title' => t('Feedback messages'),
      'description' => t('View feedback messages.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'feedback_admin_view_form',
      'access' => user_access('view feedback messages'),
    );
  }
  else {
    if (user_access('access feedback form')) {
      drupal_add_css(drupal_get_path('module', 'feedback') . '/feedback.css');
      drupal_add_js(drupal_get_path('module', 'feedback') . '/feedback.js');
    }
  }
  return $items;
}