Projet

Général

Profil

Révision 0695d136

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ckeditor/includes/ckeditor.lib.inc
1202 1202

  
1203 1203
  // add custom stylesheet if configured
1204 1204
  // lets hope it exists but we'll leave that to the site admin
1205
  $query_string = '?' . substr(variable_get('css_js_query_string', '0'), 0, 1);
1205
  $query_string = '?' . variable_get('css_js_query_string', '0');
1206 1206
  $css_files = array();
1207 1207
  switch ($conf['css_mode']) {
1208 1208
    case 'theme':
......
1363 1363
 *
1364 1364
 */
1365 1365
function ckeditor_load_by_field($field, $format, $show_toggle = TRUE, $add_fields_to_toggle = FALSE) {
1366
  global $theme;
1366
  global $user, $theme;
1367 1367
  static $processed_ids = array();
1368 1368
  static $is_running = FALSE;
1369 1369
  $use_ckeditor = FALSE;
......
1474 1474
    $editor_url_path = ckeditor_path('url');
1475 1475

  
1476 1476
    if (!$is_running) {
1477
      // By default sessions are not started automatically for anonymous users.
1478
      // Start one for editing content so that we had a consistent token that is used in XSS filter.
1479
      if (isset($field['#entity']) && !empty($field['#entity']->created) && empty($user->uid)) {
1480
        drupal_session_start();
1481
        $_SESSION['ckeditor_anonymous_user'] = true;
1482
        drupal_page_is_cacheable(FALSE);
1483
      }
1484

  
1477 1485
      if (!$ckeditor_in_default_format) {
1478 1486
        $load_method = 'ckeditor_basic.js';
1479 1487
        $load_time_out = 0;

Formats disponibles : Unified diff