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

Diff of /contributions/modules/views_checkboxes/views_checkboxes.module

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

revision 1.8.2.5, Mon Apr 7 18:05:40 2008 UTC revision 1.8.2.6, Mon Jun 9 00:36:24 2008 UTC
# Line 148  function views_checkboxes_form_alter($fo Line 148  function views_checkboxes_form_alter($fo
148      // Remove the "**ALL**" option if it exists:      // Remove the "**ALL**" option if it exists:
149      if (isset($these_options['**ALL**']))  unset($these_options['**ALL**']);      if (isset($these_options['**ALL**']))  unset($these_options['**ALL**']);
150    
151      // Taxonomy options will be an array of objects handled here:      // Additional processing needed for taxonomy terms - they are an array of objects so need to be converted...
152      // To do: Make sure everything works for multi-language and multi-level taxonomy lists too      // NB: $these_options[0] can be '- None -' with 'optional' taxonomy terms, so we test [0] and [1]
153      if (is_object($these_options[0])) {      if (is_object($these_options[1]) || is_object($these_options[0])) {
       // This will recreate them as a typical form option array...  
154        $newoptions = array();        $newoptions = array();
155        foreach ($these_options as $option_id => $option_obj) {        foreach ($these_options as $option_id => $option_obj) {
         // $option_obj example: stdClass Object ( [option] => Array ( [60] => English )  
156          foreach ($option_obj->option as $num => $val) {          foreach ($option_obj->option as $num => $val) {
157            $newoptions[$num] = $val;            $newoptions[$num] = $val;
158          }          }

Legend:
Removed from v.1.8.2.5  
changed lines
  Added in v.1.8.2.6

  ViewVC Help
Powered by ViewVC 1.1.2