Make WordPress Core


Ignore:
Timestamp:
03/12/2008 10:47:11 PM (16 years ago)
Author:
ryan
Message:

TinyMCE 3.05 from azaozz. fixes #6195

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/tinymce/tiny_mce_config.php

    r7173 r7270  
    167167unset( $initArray['disk_cache'], $initArray['compress'], $initArray['old_cache_max'] );
    168168
    169 $isIE5 = ( ( $msie = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) && ( (int) substr( $_SERVER['HTTP_USER_AGENT'], $msie + 5, 3 ) < 6 ) ) ? true : false;
    170 if ( $isIE5 ) $compress = false;
     169// Anybody still using IE5/5.5? It can't handle gzip compressed js well.
     170if ( $msie = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) {
     171    $ie_ver = (int) substr( $_SERVER['HTTP_USER_AGENT'] , $msie + 5, 3 );
     172    if ( $ie_ver && $ie_ver < 6 ) $compress = false;
     173}
    171174
    172175// Cache path, this is where the .gz files will be stored
     
    182185$enc = $cacheKey = $suffix = $mce_options = '';
    183186
    184 // Check if supports gzip
     187// Check if browser supports gzip
    185188if ( $compress && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
    186189    $encodings = explode( ',', strtolower( preg_replace('/\s+/', '', $_SERVER['HTTP_ACCEPT_ENCODING']) ) );
    187190
    188     if ( (in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------']) ) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression') ) {
     191    if ( (in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------']) ) && function_exists('ob_gzhandler') && (ini_get('zlib.output_compression') == false) ) {
    189192        $enc = in_array('x-gzip', $encodings) ? 'x-gzip' : 'gzip';
    190193        $cache_ext = '.gz';
     
    258261// Write file
    259262if ( '' != $cacheKey ) {
    260     if ( (int) $old_cache_max && is_dir($cache_path) ) {       
     263    if ( is_dir($cache_path) ) {       
    261264
    262265        $old_cache = array();
     
    270273           
    271274        krsort($old_cache);
    272         if ( 1 >= $old_cache_max ) $del_cache = $old_cache;
     275        if ( 1 >= (int) $old_cache_max ) $del_cache = $old_cache;
    273276        else $del_cache = array_slice( $old_cache, ($old_cache_max - 1) );
    274277           
Note: See TracChangeset for help on using the changeset viewer.