? cac_lite.module.patch ? caclite.patch Index: contrib/cac_lite/cac_lite.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/contrib/cac_lite/cac_lite.module,v retrieving revision 1.7 diff -u -p -r1.7 cac_lite.module --- contrib/cac_lite/cac_lite.module 5 Jan 2007 15:31:15 -0000 1.7 +++ contrib/cac_lite/cac_lite.module 7 Feb 2007 00:15:05 -0000 @@ -90,13 +90,15 @@ function cac_lite_menu($may_cache) { $items = array(); $admin_access = user_access('administer_cac_lite'); - if ($may_cache) { + //if ($may_cache) { $items[] = array('path' => 'admin/access/cac_lite', 'title' => t('cac_lite'), - 'callback' => 'cac_lite_admin_settings', + 'callback' => 'drupal_get_form', + 'callback arguments'=> 'cac_lite_admin_settings', 'access' => $admin_access, 'type' => MENU_LOCAL_TASK, + //'type'=> MENU_NORMAL_ITEM, 'weight' => 1, // after 'roles' tab ); $items[] = array('path' => 'admin/access/cac_lite/settings', @@ -106,12 +108,13 @@ function cac_lite_menu($may_cache) { ); $items[] = array('path' => 'admin/access/cac_lite/roles', 'title' => t('access by role'), - 'callback' => 'cac_lite_admin_settings_defaults', + 'callback'=> 'drupal_get_form', + 'callback arguments' => 'cac_lite_admin_settings_defaults', 'access' => $admin_access, 'type' => MENU_LOCAL_TASK ); - } + //} return $items; } @@ -128,13 +131,14 @@ function cac_lite_admin_settings() { '#title' => 'Containers', '#default_value' => variable_get('cac_lite_containers', null), '#options' => $options, - '#description' => t(''), + '#description' => t('Select one or more containers which limit access.'), '#multiple' => true, ); - $output .= '

'.t('Select one or more containers which limit access.')."

\n"; + //$output = '

'.t('Select one or more containers which limit access.')."

\n"; - $output .= system_settings_form('cac_lite_admin_settings', $form); + $output = system_settings_form($form); + return $output; } @@ -142,6 +146,9 @@ function cac_lite_admin_settings_default $cids = variable_get('cac_lite_containers', null); $roles = user_roles(); + $form['instruction1'] = array("#type"=>"markup", "#value"=> '

'.t('For each role below, select the categories which members of the role are allowed to view.')."

\n"); + + $form['instruction2'] = array("#type"=>"markup", "#value"=> '

'.t('You may grant individual users access to categories in addition to those selected here. See the cac_lite tab on the user edit page.')."

\n"); if (count($cids)) { $all_defaults = variable_get('cac_lite_default_grants', array()); @@ -166,9 +173,10 @@ function cac_lite_admin_settings_default '<'.t('none').'>'); } } - $output .= '

'.t('For each role below, select the categories which members of the role are allowed to view.')."

\n"; - $output .= '

'.t('You may grant individual users access to categories in addition to those selected here. See the cac_lite tab on the user edit page.')."

\n"; - $output .= system_settings_form('cac_lite_admin_settings_defaults', $form); + + + + $output = system_settings_form( $form); return $output; } else {