Projet

Général

Profil

Révision 6eb8d15f

Ajouté par Assos Assos il y a presque 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/imce/inc/imce.page.inc
116 116
  //disable devel log.
117 117
  $GLOBALS['devel_shutdown'] = FALSE;
118 118
  //for upload we must return plain text header.
119
  drupal_add_http_header('Content-Type', 'text/' . ($jsop == 'upload' ? 'html' : 'javascript') . '; charset=utf-8');
119
  drupal_add_http_header('Content-Type', (!empty($_POST['html_response']) ? 'text/html' : 'application/json') . '; charset=utf-8');
120 120
  print drupal_json_encode($response);
121 121
  exit();
122 122
}
......
144 144
    '#submit' => $imce['perm']['upload'] ? array('imce_upload_submit') : NULL,
145 145
  );
146 146
  $form = array('fset_upload' => array('#type' => 'fieldset', '#title' => t('Upload file')) + $form);
147
  $form['html_response'] = array('#type' => 'hidden', '#default_value' => '1');
147 148
  $form['#attributes']['enctype'] = 'multipart/form-data';
148 149
  $form['#action'] = $imce['url'];
149 150
  return $form;

Formats disponibles : Unified diff