Changeset 7270 for trunk/wp-includes/js/tinymce/tiny_mce_config.php
- Timestamp:
- 03/12/2008 10:47:11 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/tinymce/tiny_mce_config.php
r7173 r7270 167 167 unset( $initArray['disk_cache'], $initArray['compress'], $initArray['old_cache_max'] ); 168 168 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. 170 if ( $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 } 171 174 172 175 // Cache path, this is where the .gz files will be stored … … 182 185 $enc = $cacheKey = $suffix = $mce_options = ''; 183 186 184 // Check if supports gzip187 // Check if browser supports gzip 185 188 if ( $compress && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) { 186 189 $encodings = explode( ',', strtolower( preg_replace('/\s+/', '', $_SERVER['HTTP_ACCEPT_ENCODING']) ) ); 187 190 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) ) { 189 192 $enc = in_array('x-gzip', $encodings) ? 'x-gzip' : 'gzip'; 190 193 $cache_ext = '.gz'; … … 258 261 // Write file 259 262 if ( '' != $cacheKey ) { 260 if ( (int) $old_cache_max &&is_dir($cache_path) ) {263 if ( is_dir($cache_path) ) { 261 264 262 265 $old_cache = array(); … … 270 273 271 274 krsort($old_cache); 272 if ( 1 >= $old_cache_max ) $del_cache = $old_cache;275 if ( 1 >= (int) $old_cache_max ) $del_cache = $old_cache; 273 276 else $del_cache = array_slice( $old_cache, ($old_cache_max - 1) ); 274 277
Note: See TracChangeset
for help on using the changeset viewer.