Wikia code/includes/specials/SpecialUpload.php

--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\specials\SpecialUpload.php	2011-07-18 22:31:17.755859400 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\specials\SpecialUpload.php	2011-08-17 15:28:16.404296900 +0100
@@ -135,7 +135,10 @@
 			if( !$wgUser->isLoggedIn() && ( $wgGroupPermissions['user']['upload']
 				|| $wgGroupPermissions['autoconfirmed']['upload'] ) ) {
 				// Custom message if logged-in users without any special rights can upload
-				$wgOut->showErrorPage( 'uploadnologin', 'uploadnologintext' );
+				/* Wikia change begin - @author: Marooned */
+				/* pass returnTo parameter */
+				$wgOut->showErrorPage( 'uploadnologin', 'uploadnologintext', array(wfGetReturntoParam()) );
+				/* Wikia change end */
 			} else {
 				$wgOut->permissionRequired( 'upload' );
 			}