Index: modules/forum/forum.module =================================================================== RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v retrieving revision 1.382 diff -u -p -r1.382 forum.module --- modules/forum/forum.module 1 Feb 2007 21:44:36 -0000 1.382 +++ modules/forum/forum.module 4 Feb 2007 04:30:32 -0000 @@ -75,19 +75,21 @@ function forum_menu() { 'type' => MENU_LOCAL_TASK, 'parent' => 'admin/content/forum', ); - $items['admin/content/forum/edit'] = array( + $items['admin/content/forum/edit/[forum_from_arg]'] = array( 'page callback' => 'forum_form_main', - 'map arguments' => array('_forum_get_term', 5, array()), 'type' => MENU_CALLBACK, ); - $items['admin/content/forum/edit/container/%'] = array( + $items['admin/content/forum/edit/container/[forum_from_arg]'] = array( 'title' => t('Edit container'), + 'page callback' => 'forum_form_main', 'page arguments' => array('container', 5), + 'type' => MENU_CALLBACK, ); - $items['admin/content/forum/edit/forum/%'] = array( + $items['admin/content/forum/edit/forum/[forum_from_arg]'] = array( 'title' => t('Edit forum'), 'page callback' => 'forum_form_main', 'page arguments' => array('forum', 5), + 'type' => MENU_CALLBACK, ); return $items; } @@ -96,8 +98,11 @@ function forum_init() { drupal_add_css(drupal_get_path('module', 'forum') .'/forum.css'); } -function _forum_get_term($tid) { - return (array)taxonomy_get_term($tid); +function forum_from_arg($operation, $arg) { + if ($operation == MENU_HANDLE_REQUEST) { + return is_numeric($arg) ? (array)taxonomy_get_term($arg) : FALSE; + } + return $arg; } /**