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

Diff of /contributions/modules/taxonomy_browser/taxonomy_browser.module

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

revision 1.19.2.28, Fri Jun 20 04:08:03 2008 UTC revision 1.19.2.29, Thu Jun 26 16:30:54 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: taxonomy_browser.module,v 1.19.2.27 2008/06/16 19:09:14 nancyw Exp $  // $Id: taxonomy_browser.module,v 1.19.2.28 2008/06/20 04:08:03 nancyw Exp $
3  // Original by Moshe Weitzman (weitzmna@tejasa.com)  // Original by Moshe Weitzman (weitzmna@tejasa.com)
4    
5  /**  /**
# Line 174  function taxonomy_browser_admin_settings Line 174  function taxonomy_browser_admin_settings
174      $select[$vocabulary->vid] = $vocabulary->name;      $select[$vocabulary->vid] = $vocabulary->name;
175    }    }
176    
177      $current_vocabs = variable_get('taxonomy_browser_vocabularies', array());
178      // Occasionally we get a 0 vid in the array.
179      unset($current_vocabs[0]);
180    
181    $form['taxonomy_browser_vocabularies'] = array(    $form['taxonomy_browser_vocabularies'] = array(
182      '#title' => t('Included Vocabularies'),      '#title' => t('Included Vocabularies'),
183      '#type' => 'checkboxes',      '#type' => 'checkboxes',
184      '#default_value' => variable_get('taxonomy_browser_vocabularies', array()),      '#default_value' => $current_vocabs,
185      '#options' => $select,      '#options' => $select,
186      '#description' => t('Select the vocabularies the user can select from on the category browser page.'),      '#description' => t('Select the vocabularies the user can select from on the category browser page.'),
187      '#prefix' => '<div class="taxonomy_browser_checkboxes">',      '#prefix' => '<div class="taxonomy_browser_checkboxes">',
# Line 293  function taxonomy_browser_form() { Line 297  function taxonomy_browser_form() {
297      );      );
298    
299    $vocabularies = array_filter(variable_get('taxonomy_browser_vocabularies', array()));    $vocabularies = array_filter(variable_get('taxonomy_browser_vocabularies', array()));
300  //  drupal_set_message('variable: '. print_r($vocabularies, true));    // Occasionally we get a 0 vid in the array.
301      unset($vocabularies[0]);
302    
303    // Has the admin selected any vocabs?    // Has the admin selected any vocabs?
304    if (count($vocabularies) == 0) {    if (count($vocabularies) == 0) {
305      $vocabs = taxonomy_get_vocabularies();      $vocabs = taxonomy_get_vocabularies();
306      foreach ($vocabs as $vocabulary) {      foreach ($vocabs as $vocabulary) {
307        $vocabularies[$vocabulary->vid] = 1;        $vocabularies[$vocabulary->vid] = 1;
308      }      }
 //  drupal_set_message('all: '. print_r($vocabularies, true));  
309    }    }
310    
311    if ($allow_children) {    if ($allow_children) {

Legend:
Removed from v.1.19.2.28  
changed lines
  Added in v.1.19.2.29

  ViewVC Help
Powered by ViewVC 1.1.2