/[drupal]/contributions/modules/index/includes/index.admin.inc
ViewVC logotype

Diff of /contributions/modules/index/includes/index.admin.inc

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

revision 1.1.2.2 by xano, Tue Nov 17 19:23:38 2009 UTC revision 1.1.2.3 by xano, Tue Nov 17 19:32:18 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: index.admin.inc,v 1.1.2.1 2009/11/17 17:46:41 xano Exp $  // $Id: index.admin.inc,v 1.1.2.2 2009/11/17 19:23:38 xano Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 287  function index_form_add_populate_index(i Line 287  function index_form_add_populate_index(i
287        $lineages[] = $clicked_lineage . '-' . $count_children;        $lineages[] = $clicked_lineage . '-' . $count_children;
288      }      }
289    }    }
290      // Create layers for every known lineage, either existing or new.
291    foreach ($lineages as $lineage) {    foreach ($lineages as $lineage) {
292      $lineage = (string) $lineage;      $lineage = (string) $lineage;
293      // Don't save this layer and its children into the index if it has been      // Don't save this layer and its children into the index if it has been
# Line 351  function _index_form_add_layers(array &$ Line 352  function _index_form_add_layers(array &$
352        $form['layer_type_' . $layer['lineage']] = array(        $form['layer_type_' . $layer['lineage']] = array(
353          '#type' => 'select',          '#type' => 'select',
354          '#options' => $layer_entity_types_options,          '#options' => $layer_entity_types_options,
355          // Unconfigured elements get the first of the available values as their          // Unconfigured layers get the first of the available values as their
356          // default value.          // default value.
357          '#default_value' => !is_null($layer['entity_type']) ? $layer['entity_type'] : array_shift(array_keys($layer_entity_types_options)),          '#default_value' => !is_null($layer['entity_type']) ? $layer['entity_type'] : array_shift(array_keys($layer_entity_types_options)),
358        );        );
# Line 369  function _index_form_add_layers(array &$ Line 370  function _index_form_add_layers(array &$
370          'class' => 'index-form-add-layer-child-add',          'class' => 'index-form-add-layer-child-add',
371          'title' => t('Add item'),          'title' => t('Add item'),
372        ),        ),
373          // By default FAPI gives every button name="op", which makes it
374          // impossible to detect the clicked button if multiple buttons have the
375          // same value. To fix this we configure a custom and unique name
376          // (undocumented feature).
377        '#name' => 'layer_child_add_' . $layer['lineage'],        '#name' => 'layer_child_add_' . $layer['lineage'],
378      );      );
379      $form['layer_remove_' . $layer['lineage']] = array(      $form['layer_remove_' . $layer['lineage']] = array(
# Line 379  function _index_form_add_layers(array &$ Line 384  function _index_form_add_layers(array &$
384          'class' => 'index-form-add-layer-remove',          'class' => 'index-form-add-layer-remove',
385          'title' => t('Remove this item and its children'),          'title' => t('Remove this item and its children'),
386        ),        ),
387          // By default FAPI gives every button name="op", which makes it
388          // impossible to detect the clicked button if multiple buttons have the
389          // same value. To fix this we configure a custom and unique name
390          // (undocumented feature).
391        '#name' => 'layer_remove_' . $layer['lineage'],        '#name' => 'layer_remove_' . $layer['lineage'],
392      );      );
393    

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

  ViewVC Help
Powered by ViewVC 1.1.3