http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89987

Revision: 89987
Author:   neilk
Date:     2011-06-13 18:15:49 +0000 (Mon, 13 Jun 2011)
Log Message:
-----------
prevent subscriptions and readiness events from hanging around forever

Modified Paths:
--------------
    trunk/extensions/UploadWizard/resources/jquery/jquery.pubsub.js
    trunk/extensions/UploadWizard/resources/mw.UploadWizard.js

Modified: trunk/extensions/UploadWizard/resources/jquery/jquery.pubsub.js
===================================================================
--- trunk/extensions/UploadWizard/resources/jquery/jquery.pubsub.js     
2011-06-13 18:10:43 UTC (rev 89986)
+++ trunk/extensions/UploadWizard/resources/jquery/jquery.pubsub.js     
2011-06-13 18:15:49 UTC (rev 89987)
@@ -99,4 +99,19 @@
                }
                return success;
        };
+
+       /** 
+        * Prevent ready objects from hanging around forever
+        */
+       $.purgeReadyEvents = function() {
+               ready = {};
+       };
+
+       /**
+        * Remove all subscriptions from everything
+        */
+       $.purgeSubscriptions = function() {
+               subs = {};
+       };
+
 } )( jQuery );

Modified: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
===================================================================
--- trunk/extensions/UploadWizard/resources/mw.UploadWizard.js  2011-06-13 
18:10:43 UTC (rev 89986)
+++ trunk/extensions/UploadWizard/resources/mw.UploadWizard.js  2011-06-13 
18:15:49 UTC (rev 89987)
@@ -775,6 +775,8 @@
         * Depending on whether we split uploading / detailing, it may actually 
always be as simple as loading a URL
         */
        reset: function() {
+               $.purgeReadyEvents();
+               $.purgeSubscriptions();
                this.removeMatchingUploads( function() { return true; } );
        },
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to