All pastes #567222 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-06-14 21:46 UTC
rendered paste body
----------------------------------------
------ Code in the contrib Module ------
function userpoints_transaction_tools_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'userpoints/myuserpoints',
      'title' => t('My') . ' ' . t('%Points', userpoints_translation()),
      'callback' => 'userpoints_transaction_tools_my_userpoints',
      'access' => user_access('use userpoints'),
      'type' => MENU_NORMAL_ITEM
    );
    $items[] = array(
          'path'     => 'userpoint',
          'callback' => 'userpoints_transaction_tools_list_users',
          'title'    => t('%Points for this person', userpoints_translation()),
          'access'   => user_access(USERPOINTS_PERM_VIEW),
          'type'     => MENU_NORMAL_ITEM,
    );
  }

  return $items;
}

------------------------------------------
----- Code in the Main/Master module -----
----- I'm trying to override this    -----
------------------------------------------
function userpoints_menu($may_cache) {
  $items = array();

  if ($may_cache) {
    $items[] = array(
      'path'     => 'userpoints',
      'callback' => 'userpoints_list_users',
      'title'    => t('users by %points', userpoints_translation()),
      'access'   => user_access(USERPOINTS_PERM_VIEW),
      'type'     => MENU_NORMAL_ITEM,
    );
  } 
}