AjaxUpload: fixed handling of upload completion
authorDan Fuhry <dan@enanocms.org>
Mon, 05 Dec 2011 08:16:00 -0500
changeset 1356 e80b5733ce9d
parent 1355 12c23b83c79d
child 1357 4f83d730633f
AjaxUpload: fixed handling of upload completion
plugins/SpecialPageFuncs.php
--- a/plugins/SpecialPageFuncs.php	Fri Dec 02 01:15:55 2011 -0500
+++ b/plugins/SpecialPageFuncs.php	Mon Dec 05 08:16:00 2011 -0500
@@ -716,7 +716,15 @@
 		$key = "upload_progress_{$_GET['uploadstatus']}";
 		$info = isset($_SESSION[$key]) ? $_SESSION[$key] : array();
 		if ( isset($_SESSION[$key]) && $_SESSION[$key]['done'] )
+		{
 			unset($_SESSION[$key]);
+		}
+		
+		if ( !isset($_SESSION[$key]) )
+		{
+			// workaround to cause stuck uploads on the client side to shut up
+			$info['done'] = true;
+		}
 		
 		if ( is_array($info) )
 		{