? bawstats.install ? bawstats_587262-1.patch ? icon Index: bawstats.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/bawstats/bawstats.module,v retrieving revision 1.2 diff -u -p -r1.2 bawstats.module --- bawstats.module 24 Mar 2008 21:58:17 -0000 1.2 +++ bawstats.module 24 Sep 2009 22:45:27 -0000 @@ -107,45 +107,35 @@ function bawstats_menu() { 'access arguments' => array('view site statistics'), ); - // create the sub group menues if requested + // create the sub group menus if requested if (variable_get('bawstats_page_view',0)>0) { $statgroups = variable_get('bawstats_groups',array()); if (count($statgroups)>0) { $pri = 1; foreach ($statgroups as $group => $group_details) { - if ($pri==1) { - $items['admin/reports/bawstats/'.$group.'/%/%'] = array( - 'title' => 'View Site Statistics', - 'type' => MENU_CALLBACK, - 'page callback' => 'bawstats_view_theform', - 'page arguments' => array(4,5,$group), - 'file' => 'bawstats.stats.inc', - 'file path' => $includes_path, - 'weight' => $pri, - 'access arguments' => array('view site statistics') - ); - } else { - $items['admin/reports/bawstats/'.$group] = array( - 'title' => $group_details, - 'type' => MENU_NORMAL_ITEM, - 'page callback' => 'bawstats_set_section', - 'page arguments' => array($group), - 'file' => 'bawstats.stats.inc', - 'file path' => $includes_path, - 'weight' => $pri, - 'access arguments' => array('view site statistics') - ); - $items['admin/reports/bawstats/'.$group.'/%/%'] = array( - 'title' => $group_details, - 'type' => MENU_CALLBACK, - 'page callback' => 'bawstats_view_theform', - 'page arguments' => array(4,5,$group), - 'file' => 'bawstats.stats.inc', - 'file path' => $includes_path, - 'weight' => $pri, - 'access arguments' => array('view site statistics') - ); + $items['admin/reports/bawstats/'.$group] = array( + 'title' => $group_details, + 'type' => MENU_LOCAL_TASK, + 'page callback' => 'bawstats_set_section', + 'page arguments' => array($group), + 'file' => 'bawstats.stats.inc', + 'file path' => $includes_path, + 'weight' => $pri, + 'access arguments' => array('view site statistics') + ); + if ($pri == 1) { + $items['admin/reports/bawstats/'.$group]['type'] = MENU_DEFAULT_LOCAL_TASK; } + $items['admin/reports/bawstats/'.$group.'/%/%'] = array( + 'title' => $group_details, + 'type' => MENU_LOCAL_TASK, + 'page callback' => 'bawstats_view_theform', + 'page arguments' => array(4,5,$group), + 'file' => 'bawstats.stats.inc', + 'file path' => $includes_path, + 'weight' => $pri, + 'access arguments' => array('view site statistics') + ); $pri += 1; } } Index: includes/bawstats.admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/bawstats/includes/bawstats.admin.inc,v retrieving revision 1.2 diff -u -p -r1.2 bawstats.admin.inc --- includes/bawstats.admin.inc 24 Mar 2008 21:58:17 -0000 1.2 +++ includes/bawstats.admin.inc 24 Sep 2009 22:45:27 -0000 @@ -93,11 +93,11 @@ function bawstats_admin_settings() { $form['bawstats_settings']['bawstats_page_view'] = array( '#type' => 'checkbox', '#title' => t('Split page view'), - '#default_value' => variable_get('bawstats_page_view',0), - '#description' => t('By default statistics for a single month are displayed on a single large page. Selecting this option splits the page into multiple sub-views.'), - '#weight' => 1 + '#default_value' => variable_get('bawstats_page_view', 0), + '#description' => t('By default statistics for a single month are displayed on a single large page. Selecting this option splits the statistics across multiple pages, which are accessed via tabs.'), + '#weight' => 1, ); - // turn off display controle if we are not yet configured + // turn off display control if we are not yet configured //if ($configured==0) $form['bawstats_settings']['bawstats_page_view']['#disabled']=TRUE; $form['buttons']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration') );