[Mapbender-commits] r5851 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Mar 29 05:24:40 EDT 2010


Author: verenadiewald
Date: 2010-03-29 05:24:20 -0400 (Mon, 29 Mar 2010)
New Revision: 5851

Modified:
   trunk/mapbender/http/plugins/jq_upload.php
Log:
removed testing exceptions

Modified: trunk/mapbender/http/plugins/jq_upload.php
===================================================================
--- trunk/mapbender/http/plugins/jq_upload.php	2010-03-29 08:04:20 UTC (rev 5850)
+++ trunk/mapbender/http/plugins/jq_upload.php	2010-03-29 09:24:20 UTC (rev 5851)
@@ -2,6 +2,7 @@
 	require_once(dirname(__FILE__) . "/../php/mb_validateSession.php");
 	
 	$id = $_GET["id"];
+	
 	if (!preg_match("/[a-zA-Z0-9-_]+/", $id)) {
    		$message = "cancelled";
 	}
@@ -22,8 +23,6 @@
 			$allowedFileTypes = explode(",", UPLOAD_WHITELIST_FILE_TYPES);
 		}
 
-			new mb_exception(1);
-
 		// check if file type is valid
 		foreach ($allowedFileTypes as $item) {
 			$cancel = true;
@@ -33,7 +32,6 @@
 				break;
 			}
 		}
-			new mb_exception(2);
 		
 		$disallowedFileTypes = array("PHP", "PHP3", "PHP4", "PHTML", "PHP5", "PHP6");
 		if (defined("UPLOAD_BLACKLIST_FILE_TYPES")) {
@@ -42,8 +40,7 @@
 				$disallowedFileTypes
 			);
 		}
-					new mb_exception(3);
-
+		
 		// check if file type is valid
 		foreach ($disallowedFileTypes as $item) {
 			if(preg_match("/\.$item\$/i", $clientFilename)) {
@@ -52,7 +49,7 @@
 				break;
 			}
 		}
-					new mb_exception(4);
+		
 		$maxSize = intval(ini_get("upload_max_filesize"))*1024;
 		if (defined("UPLOAD_MAX_SIZE_KB") && UPLOAD_MAX_SIZE_KB < $maxSize) {
 			$maxSize = UPLOAD_MAX_SIZE_KB;



More information about the Mapbender_commits mailing list