/[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.3, Tue Dec 9 19:47:53 2008 UTC revision 1.9.2.4, Tue Dec 9 20:00:28 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2    // $Id: tac_lite.module,v 1.9.2.2 2008/12/08 18:40:45 yogadex Exp $    // $Id: tac_lite.module,v 1.9.2.3 2008/12/09 19:47:53 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 263  function tac_lite_user($op, $edit, $acco Line 263  function tac_lite_user($op, $edit, $acco
263        if (count($vids)) {        if (count($vids)) {
264          for ($i = 1; $i <= variable_get('tac_lite_schemes', 1); $i++) {          for ($i = 1; $i <= variable_get('tac_lite_schemes', 1); $i++) {
265            $config = _tac_lite_config($i);            $config = _tac_lite_config($i);
266              $terms = isset($account->$config['realm']) ? $account->$config['realm'] : array();
267            if ($config['name']) {            if ($config['name']) {
268              $form['tac_lite'][$config['realm']] =              $form['tac_lite'][$config['realm']] =
269                array('#type' => 'fieldset',                array('#type' => 'fieldset',
# Line 270  function tac_lite_user($op, $edit, $acco Line 271  function tac_lite_user($op, $edit, $acco
271                      '#description' => t('This scheme includes permissions %perms',                      '#description' => t('This scheme includes permissions %perms',
272                                          array('%perms' => implode(' and ', $config['perms']))),                                          array('%perms' => implode(' and ', $config['perms']))),
273                      '#tree' => TRUE,                      '#tree' => TRUE,
274                      );                );
275              foreach ($vids as $vid) {              foreach ($vids as $vid) {
276                $v = $vocabularies[$vid];                $v = $vocabularies[$vid];
277                $form['tac_lite'][$config['realm']][$vid] =                $form['tac_lite'][$config['realm']][$vid] =
278                  _taxonomy_term_select($v->name,                  _taxonomy_term_select($v->name,
279                                        null, // name no longer used in new form api                                        null, // name no longer used in new form api
280                                        isset($account->tac_lite) ? $account->tac_lite[$vid] : NULL,                                        isset($terms[$vid]) ? $terms[$vid] : NULL,
281                                        $vid,                                        $vid,
282                                        '',                                        '',
283                                        true,                                        true,

Legend:
Removed from v.1.9.2.3  
changed lines
  Added in v.1.9.2.4

  ViewVC Help
Powered by ViewVC 1.1.2