Changeset 6900

Show
Ignore:
Timestamp:
02/18/08 19:25:56 (9 months ago)
Author:
ryan
Message:

TinyMCE compressor fixes from azaozz. fixes #5900

Files:

Legend:

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

    r6894 r6900  
    126126    'disk_cache' => true, 
    127127    'compress' => true, 
    128     'old_cache_max' => '3' // number of cache files to keep 
     128    'old_cache_max' => '1' // number of cache files to keep 
    129129); 
    130130 
     
    253253if ( '' != $cacheKey && $cache_path ) { 
    254254    if ( $old_cache_max ) { 
    255         $old_keys = getFileContents('tinymce_compressed_key' . $cache_ext); 
     255        $old_keys = getFileContents('tinymce_compressed' . $cache_ext . '_key'); 
    256256             
    257257        if ( '' != $old_keys ) { 
    258258            $keys_ar = explode( "\n", $old_keys ); 
    259             if ( ($old_cache_max - 1) > count($old_keys_ar) ) 
    260                $old_keys_rem = array_slice( $keys_ar, ($old_cache_max - 1) ); 
     259            if ( 1 >= $old_cache_max ) $old_keys_rem = $keys_ar; 
     260            else $old_keys_rem = array_slice( $keys_ar, ($old_cache_max - 1) ); 
    261261             
    262262            foreach ( $old_keys_rem as $key ) { 
     
    273273        } 
    274274         
    275         putFileContents( 'tinymce_compressed_key' . $cache_ext, $cacheKey ); 
     275        putFileContents( 'tinymce_compressed' . $cache_ext . '_key', $cacheKey ); 
    276276    } 
    277277