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

git-svn-id: https://develop.svn.wordpress.org/trunk@4209 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-09-22 19:35:37 +00:00
parent c227947744
commit 58a933b906
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' ) {