Projet

Général

Profil

Révision 6ff32cea

Ajouté par Florent Torregrosa il y a environ 9 ans

Update core to 7.36

Voir les différences:

drupal7/modules/image/image.module
1027 1027
  // The token query is added even if the 'image_allow_insecure_derivatives'
1028 1028
  // variable is TRUE, so that the emitted links remain valid if it is changed
1029 1029
  // back to the default FALSE.
1030
  $token_query = array(IMAGE_DERIVATIVE_TOKEN => image_style_path_token($style_name, $original_uri));
1030
  // However, sites which need to prevent the token query from being emitted at
1031
  // all can additionally set the 'image_suppress_itok_output' variable to TRUE
1032
  // to achieve that (if both are set, the security token will neither be
1033
  // emitted in the image derivative URL nor checked for in
1034
  // image_style_deliver()).
1035
  $token_query = array();
1036
  if (!variable_get('image_suppress_itok_output', FALSE)) {
1037
    $token_query = array(IMAGE_DERIVATIVE_TOKEN => image_style_path_token($style_name, $original_uri));
1038
  }
1031 1039

  
1032 1040
  // If not using clean URLs, the image derivative callback is only available
1033 1041
  // with the query string. If the file does not exist, use url() to ensure
......
1039 1047
  }
1040 1048

  
1041 1049
  $file_url = file_create_url($uri);
1042
  // Append the query string with the token.
1043
  return $file_url . (strpos($file_url, '?') !== FALSE ? '&' : '?') . drupal_http_build_query($token_query);
1050
  // Append the query string with the token, if necessary.
1051
  if ($token_query) {
1052
    $file_url .= (strpos($file_url, '?') !== FALSE ? '&' : '?') . drupal_http_build_query($token_query);
1053
  }
1054

  
1055
  return $file_url;
1044 1056
}
1045 1057

  
1046 1058
/**

Formats disponibles : Unified diff