Projet

Général

Profil

Révision c304a780

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ctools/plugins/contexts/term.inc
2 2

  
3 3
/**
4 4
 * @file
5
 *
6
 * Plugin to provide a term context
5
 * Plugin to provide a term context.
7 6
 */
8 7

  
9 8
/**
......
116 115
 * Validate a term.
117 116
 */
118 117
function ctools_context_term_settings_form_validate($form, &$form_state) {
119
  // Validate the autocomplete
118
  // Validate the autocomplete.
120 119
  $vid = $form_state['values']['vid'];
121 120
  if (empty($form_state['values']['tid']) && empty($form_state['values']['taxonomy'][$vid])) {
122 121
    form_error($form['taxonomy'][$vid], t('You must select a term.'));
......
154 153
  switch ($type) {
155 154
    case 'tid':
156 155
      return $context->data->tid;
156

  
157 157
    case 'name':
158 158
      return $context->data->name;
159

  
159 160
    case 'name_dashed':
160 161
      return drupal_strtolower(str_replace(' ', '-', $context->data->name));
162

  
161 163
    case 'vid':
162 164
      return $context->data->vid;
165

  
163 166
    case 'description':
164 167
      return $context->data->description;
165 168
  }

Formats disponibles : Unified diff