Tabbed editor and autosave fixes. Props skeltoac and westi. #2829

git-svn-id: http://svn.automattic.com/wordpress/trunk@4209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-09-22 19:35:37 +00:00
parent 01949a7967
commit 6e9539c22c
2 changed files with 4 additions and 3 deletions

View File

@ -72,7 +72,7 @@ function autosave_saved() {
function autosave() {
var form = $('post');
var rich = tinyMCE.getInstanceById('content') ? true : false;
var rich = ((typeof tinyMCE != "undefined") && tinyMCE.getInstanceById('content')) ? true : false;
autosaveAjax = new sack();

View File

@ -35,8 +35,9 @@ function wp_tinymce_lang($path) {
// Fall back on en.js
if ( empty($text) )
$text = file_get_contents(realpath(sprintf($path, 'en')));
$file = realpath(sprintf($path, 'en'));
if ( empty($text) && file_exists($file) )
$text = file_get_contents($file);
// Send lang file through gettext
if ( function_exists('__') && strtolower(substr($language, 0, 2)) != 'en' ) {