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/content_types/node/node.inc
46 46
    }
47 47
  }
48 48

  
49
  // Support node translation
49
  // Support node translation.
50 50
  if (module_exists('translation')) {
51 51
    if ($translations = module_invoke('translation', 'node_get_translations', $nid)) {
52
      if (isset($translations[$GLOBALS['language']->language]))  {
52
      if (isset($translations[$GLOBALS['language']->language])) {
53 53
        $nid = $translations[$GLOBALS['language']->language]->nid;
54 54
      }
55 55
    }
......
121 121
    '#description' => t('Check this box if you would like your pane title to link to the node.'),
122 122
  );
123 123

  
124

  
125 124
  if ($form_state['op'] == 'add') {
126 125
    $form['nid'] = array(
127 126
      '#prefix' => '<div class="no-float">',
......
179 178
/**
180 179
 * Validate the node selection.
181 180
 */
182
function  ctools_node_content_type_edit_form_validate(&$form, &$form_state) {
181
function ctools_node_content_type_edit_form_validate(&$form, &$form_state) {
183 182
  if ($form_state['op'] != 'add') {
184 183
    return;
185 184
  }
......
205 204
  }
206 205

  
207 206
  if (!($node || preg_match('/^[@%]\d+$/', $nid)) ||
208
      // Do not allow unpublished nodes to be selected by unprivileged users
207
      // Do not allow unpublished nodes to be selected by unprivileged users.
209 208
      (empty($node->status) && !user_access('administer nodes'))) {
210 209
    form_error($form['nid'], t('Invalid node'));
211 210
  }

Formats disponibles : Unified diff