| 1 |
<?php |
<?php |
| 2 |
// $Id: tac_lite.module,v 1.9.2.1 2008/12/08 18:36:42 yogadex Exp $ |
// $Id: tac_lite.module,v 1.9.2.2 2008/12/08 18:40:45 yogadex Exp $ |
| 3 |
/** |
/** |
| 4 |
* @file |
* @file |
| 5 |
* Control access to site content based on taxonomy, roles and users. |
* Control access to site content based on taxonomy, roles and users. |
| 44 |
$items = array(); |
$items = array(); |
| 45 |
|
|
| 46 |
$items['admin/user/access/tac_lite'] = |
$items['admin/user/access/tac_lite'] = |
| 47 |
array('title' => t('Access control by taxonomy'), |
array('title' => 'Access control by taxonomy', |
| 48 |
'description' => "taxonomy-based permissions by tac_lite", |
'description' => "taxonomy-based permissions by tac_lite", |
| 49 |
'page callback' => 'drupal_get_form', |
'page callback' => 'drupal_get_form', |
| 50 |
'page arguments' => array('tac_lite_admin_settings'), |
'page arguments' => array('tac_lite_admin_settings'), |
| 54 |
); |
); |
| 55 |
|
|
| 56 |
$items['admin/user/access/tac_lite/settings'] = |
$items['admin/user/access/tac_lite/settings'] = |
| 57 |
array('title' => t('Settings'), |
array('title' => 'Settings', |
| 58 |
'type' => MENU_DEFAULT_LOCAL_TASK, |
'type' => MENU_DEFAULT_LOCAL_TASK, |
| 59 |
'weight' => -1, |
'weight' => -1, |
| 60 |
'access arguments' => array('administer_tac_lite'), |
'access arguments' => array('administer_tac_lite'), |
| 63 |
$schemes = variable_get('tac_lite_schemes', 1); |
$schemes = variable_get('tac_lite_schemes', 1); |
| 64 |
for ($i = 1; $i <= $schemes; $i++) { |
for ($i = 1; $i <= $schemes; $i++) { |
| 65 |
$items['admin/user/access/tac_lite/scheme_' . $i] = |
$items['admin/user/access/tac_lite/scheme_' . $i] = |
| 66 |
array('title' => t('Scheme !num', array('!num' => $i)), |
array('title' => "Scheme $i", |
| 67 |
'page callback' => 'tac_lite_admin_settings_scheme', |
'page callback' => 'tac_lite_admin_settings_scheme', |
| 68 |
'page arguments' => array((string)$i), |
'page arguments' => array((string)$i), |
| 69 |
'type' => MENU_LOCAL_TASK, |
'type' => MENU_LOCAL_TASK, |