Projet

Général

Profil

Révision 661d64c9

Ajouté par Assos Assos il y a plus de 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/diff/includes/image.inc
68 68
      if ($settings['show_id']) {
69 69
        $output[] = t('File ID: !fid', $t_args);
70 70
      }
71
      $diff_items[$delta] = implode('; ', $output);
71
      $separator = $settings['property_separator'] == 'nl' ? "\n" : $settings['property_separator'];
72
      $diff_items[$delta] = implode($separator, $output);
72 73
    }
73 74
  }
74 75

  
......
83 84
    'show_id' => 0,
84 85
    'compare_alt_field' => 0,
85 86
    'compare_title_field' => 0,
87
    'property_separator' => '; ',
86 88
  );
87 89
}
88 90

  
......
108 110
    '#default_value' => $settings['compare_title_field'],
109 111
    '#description' => t('This is only used if the "Enable <em>Title</em> field" is checked in the instance settings.'),
110 112
  );
113
  $options_form['property_separator'] = array(
114
    '#type' => 'select',
115
    '#title' => t('Property separator'),
116
    '#default_value' => $settings['property_separator'],
117
    '#description' => t('Provides the ability to show properties inline or across multiple lines.'),
118
    '#options' => array(
119
      ', ' => t('Comma (,)'),
120
      '; ' => t('Semicolon (;)'),
121
      ' ' => t('Space'),
122
      'nl' => t('New line'),
123
    ),
124
  );
125
  // Allow users to set their own separator using variable_set().
126
  if (!isset($options_form['#options'][$settings['property_separator']])) {
127
    $options_form['#options'][$settings['property_separator']] = $settings['property_separator'];
128
  }
111 129
  return $options_form;
112 130
}

Formats disponibles : Unified diff