Remove non-gzipped version of tinymce. Brace for impact. props azaozz. see #13307.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-20 21:05:16 +00:00
parent 4976188b2f
commit 3f443689ed
3 changed files with 7 additions and 33 deletions

View File

@ -1551,7 +1551,9 @@ function wp_tiny_mce( $teeny = false, $settings = false ) {
script_concat_settings();
$language = $initArray['language'];
$zip = $compress_scripts ? 1 : 0;
$compressed = $compress_scripts && $concatenate_scripts && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
&& false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip');
/**
* Deprecated
@ -1585,8 +1587,8 @@ tinyMCEPreInit = {
</script>
<?php
if ( $concatenate_scripts )
echo "<script type='text/javascript' src='$baseurl/wp-tinymce.php?c=$zip&amp;$version'></script>\n";
if ( $compressed )
echo "<script type='text/javascript' src='$baseurl/wp-tinymce.php?c=1&amp;$version'></script>\n";
else
echo "<script type='text/javascript' src='$baseurl/tiny_mce.js?$version'></script>\n";
@ -1599,7 +1601,7 @@ tinyMCEPreInit = {
<script type="text/javascript">
/* <![CDATA[ */
<?php if ( $ext_plugins ) echo "$ext_plugins\n"; ?>
<?php if ( $concatenate_scripts ) { ?>
<?php if ( $compressed ) { ?>
tinyMCEPreInit.go();
<?php } else { ?>
(function(){var t=tinyMCEPreInit,sl=tinymce.ScriptLoader,ln=t.mceInit.language,th=t.mceInit.theme,pl=t.mceInit.plugins;sl.markDone(t.base+'/langs/'+ln+'.js');sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'.js');sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'_dlg.js');tinymce.each(pl.split(','),function(n){if(n&&n.charAt(0)!='-'){sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'.js');sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'_dlg.js');}});})();

File diff suppressed because one or more lines are too long

View File

@ -32,6 +32,6 @@ if ( isset($_GET['c']) && 1 == $_GET['c'] && isset($_SERVER['HTTP_ACCEPT_ENCODIN
header('Content-Encoding: gzip');
echo $file;
} else {
echo get_file($basepath . '/wp-tinymce.js');
echo get_file($basepath . '/tiny_mce.js');
}
exit;