diff --git a/deployment/serendipity_editor.js b/deployment/serendipity_editor.js index bb36cafe..acac0b2b 100644 --- a/deployment/serendipity_editor.js +++ b/deployment/serendipity_editor.js @@ -268,7 +268,7 @@ function serendipity_imageSelector_done(textarea) } else if (targetval == '_blank') { itarget = ' target="_blank"'; } else if (targetval == 'plugin') { - itarget = ' id="s9yisphref' + imgID + '"'; + itarget = ' id="s9yisphref' + imgID + '" onclick="javascript:this.href = this.href + \'&serendipity[from]=\' + self.location.href;"'; prepend = ''; ilink = baseURL + 'serendipity_admin_image_selector.php?serendipity[step]=showItem&serendipity[image]=' + imgID; } @@ -288,10 +288,11 @@ function serendipity_imageSelector_done(textarea) block = insert; } - if (parent.self.opener.editorref) { + if (typeof(parent.self.opener.htmlarea_editors) != 'undefined' && typeof(parent.self.opener.htmlarea_editors[textarea] != 'undefined')) { + parent.self.opener.htmlarea_editors[textarea].surroundHTML(block, ''); + } else if (parent.self.opener.editorref) { parent.self.opener.editorref.surroundHTML(block, ''); } else { - parent.self.opener.serendipity_imageSelector_addToBody(block, textarea); } diff --git a/docs/NEWS b/docs/NEWS index b87a6cdc..8089099d 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -243,6 +243,10 @@ Version 1.1-alpha5() Version 1.0.1 () ------------------------------------------------------------------------ + * Fix problem on newer Firefox versions, where insertion of images + in the WYSIWYG editor did not work. It might be necessary to + purge your browsers cache for this to properly work. (Jay Bertrandt) + * Fix utf8 iconv conversion failing on some older PHP setups. Thanks to Matthias Leisi! diff --git a/include/admin/images.inc.php b/include/admin/images.inc.php index 65db1ca4..51e56fa7 100644 --- a/include/admin/images.inc.php +++ b/include/admin/images.inc.php @@ -515,6 +515,7 @@ switch ($serendipity['GET']['adminAction']) { NULL, 'write' ); + usort($folders, 'serendipity_sortPath'); ?>