| 1 |
<?php |
<?php |
| 2 |
// $Id: tac_lite.module,v 1.9.2.6 2008/12/09 21:47:30 yogadex Exp $ |
// $Id: tac_lite.module,v 1.9.2.7 2009/02/22 00:38:37 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. |
| 327 |
if (!count($tids)) { |
if (!count($tids)) { |
| 328 |
// no relevant terms found. |
// no relevant terms found. |
| 329 |
|
|
| 330 |
// in drupal 4-7 we had to write a row into the database. In drupal 5, it should be safe to do nothing. |
// in drupal 4-7 we had to write a row into the database. In drupal 5 and later, it should be safe to do nothing. |
| 331 |
} |
} |
| 332 |
else { |
else { |
| 333 |
// if we're here, the node has terms associated with it which restrict |
// if we're here, the node has terms associated with it which restrict |
| 426 |
// add per-role grants in addition to per-user grants |
// add per-role grants in addition to per-user grants |
| 427 |
$defaults = variable_get('tac_lite_grants_scheme_' . $scheme, array()); |
$defaults = variable_get('tac_lite_grants_scheme_' . $scheme, array()); |
| 428 |
foreach ($account->roles as $rid => $role_name) { |
foreach ($account->roles as $rid => $role_name) { |
| 429 |
if (count($defaults[$rid])) { |
if (isset($defaults[$rid]) && count($defaults[$rid])) { |
| 430 |
foreach ($defaults[$rid] as $tids) { |
foreach ($defaults[$rid] as $tids) { |
| 431 |
if (count($tids)) { |
if (count($tids)) { |
| 432 |
$grants = array_merge($grants, $tids); |
$grants = array_merge($grants, $tids); |