JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.1
[ckeditor.git] / _source / plugins / filebrowser / plugin.js
index 665a5ac..9af9714 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -278,7 +278,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        }\r
                        else if ( element.filebrowser.action == 'QuickUpload' && element[ 'for' ] )\r
                        {\r
-                               var url = element.filebrowser.url;\r
+                               url = element.filebrowser.url;\r
                                if ( url === undefined )\r
                                {\r
                                        url = editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'UploadUrl' ];\r
@@ -388,6 +388,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                init : function( editor, pluginPath )\r
                {\r
                        editor._.filebrowserFn = CKEDITOR.tools.addFunction( setUrl, editor );\r
+                       editor.on( 'destroy', function () { CKEDITOR.tools.removeFunction( this._.filebrowserFn ); } );\r
                }\r
        } );\r
 \r