/[drupal]/contributions/modules/tac_lite/tac_lite.module
ViewVC logotype

Diff of /contributions/modules/tac_lite/tac_lite.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.9.2.7, Sun Feb 22 00:38:37 2009 UTC revision 1.9.2.8, Fri Apr 17 17:28:26 2009 UTC
# Line 1  Line 1 
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.
# Line 327  function tac_lite_node_access_records($n Line 327  function tac_lite_node_access_records($n
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
# Line 426  function _tac_lite_user_tids(&$account, Line 426  function _tac_lite_user_tids(&$account,
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);

Legend:
Removed from v.1.9.2.7  
changed lines
  Added in v.1.9.2.8

  ViewVC Help
Powered by ViewVC 1.1.2