You are here

function ajax_comments_menu in AJAX Comments 5

Same name and namespace in other branches
  1. 6 ajax_comments.module \ajax_comments_menu()
  2. 7 ajax_comments.module \ajax_comments_menu()

File

./ajax_comments.module, line 42

Code

function ajax_comments_menu($may_cache) {
  global $user;
  $items = array();
  if (!$may_cache) {
    $id = arg(1);
    if (arg(0) == 'get_token') {
      $items[] = array(
        'path' => 'get_token/' . $id,
        'callback' => 'get_token',
        'callback arguments' => array(
          $id,
        ),
        'type' => MENU_CALLBACK,
        'access' => TRUE,
      );
    }
    $items[] = array(
      'path' => 'ajaxsubmit/dispatch',
      'title' => t('ajaxsubmit'),
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
      'callback' => 'ajax_comments_dispatch',
    );
  }
  return $items;
}