Fall back to wp-tinymce.js if wp-tinymce.js.gz doesn't exist
git-svn-id: http://svn.automattic.com/wordpress/trunk@11589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9d293d9f0e
commit
8502dc0487
@ -92,8 +92,7 @@ function &get_manifest() {
|
|||||||
|
|
||||||
if ( @is_file('../wp-includes/js/tinymce/tiny_mce.js') ) :
|
if ( @is_file('../wp-includes/js/tinymce/tiny_mce.js') ) :
|
||||||
$mce = array(
|
$mce = array(
|
||||||
array('../wp-includes/js/tinymce/wp-tinymce.php', 'c=1&' . $mce_ver, true),
|
array('../wp-includes/js/tinymce/wp-tinymce.php', $mce_ver, true),
|
||||||
array('../wp-includes/js/tinymce/wp-tinymce.php', 'c=0&' . $mce_ver, true),
|
|
||||||
|
|
||||||
array('../wp-includes/js/tinymce/tiny_mce.js', $mce_ver, true),
|
array('../wp-includes/js/tinymce/tiny_mce.js', $mce_ver, true),
|
||||||
array('../wp-includes/js/tinymce/langs/wp-langs-en.js', $mce_ver, true),
|
array('../wp-includes/js/tinymce/langs/wp-langs-en.js', $mce_ver, true),
|
||||||
|
@ -8,7 +8,7 @@ function get_file($path) {
|
|||||||
$path = realpath($path);
|
$path = realpath($path);
|
||||||
|
|
||||||
if ( ! $path || ! @is_file($path) )
|
if ( ! $path || ! @is_file($path) )
|
||||||
return '';
|
return false;
|
||||||
|
|
||||||
return @file_get_contents($path);
|
return @file_get_contents($path);
|
||||||
}
|
}
|
||||||
@ -20,9 +20,9 @@ header('Vary: Accept-Encoding'); // Handle proxies
|
|||||||
header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
|
header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
|
||||||
header("Cache-Control: public, max-age=$expires_offset");
|
header("Cache-Control: public, max-age=$expires_offset");
|
||||||
|
|
||||||
if ( isset($_GET['c']) && 1 == $_GET['c'] && false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') ) {
|
if ( isset($_GET['c']) && 1 == $_GET['c'] && false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && ( $file = get_file($basepath . '/wp-tinymce.js.gz') ) ) {
|
||||||
header('Content-Encoding: gzip');
|
header('Content-Encoding: gzip');
|
||||||
echo get_file($basepath . '/wp-tinymce.js.gz');
|
echo $file;
|
||||||
} else {
|
} else {
|
||||||
echo get_file($basepath . '/wp-tinymce.js');
|
echo get_file($basepath . '/wp-tinymce.js');
|
||||||
}
|
}
|
||||||
|
@ -29,4 +29,4 @@ $tinymce_version = '3241-1141';
|
|||||||
*
|
*
|
||||||
* @global string $manifest_version
|
* @global string $manifest_version
|
||||||
*/
|
*/
|
||||||
$manifest_version = '20090610';
|
$manifest_version = '20090616';
|
||||||
|
Loading…
Reference in New Issue
Block a user