[packages/jquery-uploadify] fix variable leaks to global scope

glen glen at pld-linux.org
Tue Aug 6 13:43:45 CEST 2013


commit 21349d1594e6a31b0d0b67bab507b5d57105e496
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Aug 6 13:29:52 2013 +0300

    fix variable leaks to global scope

 jquery-uploadify.spec |  2 ++
 var-leaks.patch       | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+)
---
diff --git a/jquery-uploadify.spec b/jquery-uploadify.spec
index d22f7c2..fd049f3 100644
--- a/jquery-uploadify.spec
+++ b/jquery-uploadify.spec
@@ -15,6 +15,7 @@ Source0:	http://www.uploadify.com/wp-content/uploads/files/uploadify.zip
 # Source0-md5:	438c6d7c76765ee39af0d6a8d1934e13
 Patch0:		css-path.patch
 Patch1:		jquery-ns.patch
+Patch2:		var-leaks.patch
 URL:		http://www.uploadify.com/
 BuildRequires:	closure-compiler
 BuildRequires:	js
@@ -37,6 +38,7 @@ jQuery Multiple File Upload Plugin - Uploadify.
 %undos -f php,txt,css,js
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 mv "Change Log.txt" "ChangeLog.txt"
 
diff --git a/var-leaks.patch b/var-leaks.patch
new file mode 100644
index 0000000..e40f046
--- /dev/null
+++ b/var-leaks.patch
@@ -0,0 +1,20 @@
+--- jquery-uploadify-3.2.1/jquery.uploadify.js	2013-08-06 13:12:42.705172866 +0300
++++ jquery-uploadify-3.2.1/jquery.uploadify.js	2013-08-06 13:11:35.769576017 +0300
+@@ -573,7 +573,7 @@
+ 			}
+ 
+ 			// Create the file data object
+-			itemData = {
++			var itemData = {
+ 				'fileID'     : file.id,
+ 				'instanceID' : settings.id,
+ 				'fileName'   : fileName,
+@@ -597,7 +597,7 @@
+ 			if ($.inArray('onSelect', settings.overrideEvents) < 0) {
+ 				
+ 				// Replace the item data in the template
+-				itemHTML = settings.itemTemplate;
++				var itemHTML = settings.itemTemplate;
+ 				for (var d in itemData) {
+ 					itemHTML = itemHTML.replace(new RegExp('\\$\\{' + d + '\\}', 'g'), itemData[d]);
+ 				}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/jquery-uploadify.git/commitdiff/ee1fbefd4b25aaa95340879603d7af7a2c0d4a96



More information about the pld-cvs-commit mailing list