[Mapbender-commits] r7624 - in trunk/mapbender: http/classes http/geoportal http/javascripts http/php lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Feb 18 04:29:27 EST 2011


Author: armin11
Date: 2011-02-18 01:29:27 -0800 (Fri, 18 Feb 2011)
New Revision: 7624

Modified:
   trunk/mapbender/http/classes/class_administration.php
   trunk/mapbender/http/classes/class_connector.php
   trunk/mapbender/http/classes/class_metadata_new.php
   trunk/mapbender/http/classes/class_wmc.php
   trunk/mapbender/http/geoportal/gaz.php
   trunk/mapbender/http/javascripts/mod_savewmc.php
   trunk/mapbender/http/php/mb_validateSession.php
   trunk/mapbender/http/php/mod_callMetadata.php
   trunk/mapbender/http/php/mod_savewmc_server.php
   trunk/mapbender/http/php/mod_showMetadata.php
   trunk/mapbender/lib/class_Mapbender_session.php
Log:
set no fatal php exceptions to notice

Modified: trunk/mapbender/http/classes/class_administration.php
===================================================================
--- trunk/mapbender/http/classes/class_administration.php	2011-02-18 07:58:34 UTC (rev 7623)
+++ trunk/mapbender/http/classes/class_administration.php	2011-02-18 09:29:27 UTC (rev 7624)
@@ -1409,7 +1409,7 @@
 				array_push($t, 's');
 			}
 			$sql .= ") AND gui_layer_status = 1";
-			array_push($t,'i');
+			//array_push($t,'i');
 			$res = db_prep_query($sql,$v,$t);
 			$arrayLayers = array();
 			if($row = db_fetch_array($res)){

Modified: trunk/mapbender/http/classes/class_connector.php
===================================================================
--- trunk/mapbender/http/classes/class_connector.php	2011-02-18 07:58:34 UTC (rev 7623)
+++ trunk/mapbender/http/classes/class_connector.php	2011-02-18 09:29:27 UTC (rev 7624)
@@ -250,7 +250,7 @@
 		}
 		
 		$useragent=CONNECTION_USERAGENT;
-		$e = new mb_exception("connector: CURL connect to: ".$url); 
+		$e = new mb_notice("connector: CURL connect to: ".$url); 
 		curl_setopt ($ch,CURLOPT_USERAGENT,$useragent);
 		$file = curl_exec ($ch);
 		//handle http authentication

Modified: trunk/mapbender/http/classes/class_metadata_new.php
===================================================================
--- trunk/mapbender/http/classes/class_metadata_new.php	2011-02-18 07:58:34 UTC (rev 7623)
+++ trunk/mapbender/http/classes/class_metadata_new.php	2011-02-18 09:29:27 UTC (rev 7624)
@@ -198,7 +198,7 @@
 		}
 		
 		if ($this->outputFormat === "json") {
-			$this->e = new mb_exception("orderBy old: ".$this->orderBy);
+			$this->e = new mb_notice("orderBy old: ".$this->orderBy);
 			if (isset($this->searchResources) & strtolower($this->searchResources) === "wfs") {
 				$this->databaseIdColumnName = 'featuretype_id';
 				$this->databaseTableName = 'wfs_featuretype';
@@ -281,7 +281,7 @@
 				$this->generateWMCMetadata($this->wmcDoc);
 			}
 		}
-	$this->e = new mb_exception("orderBy new: ".$this->orderBy);
+	$this->e = new mb_notice("orderBy new: ".$this->orderBy);
 	}
 
 	private function microtime_float() {
@@ -794,7 +794,7 @@
 		$whereStr = "";
 		$whereCondArray = array();
 		$isTextSearch = "false";
-		$e = new mb_exception("Number of used searchstrings: ".count($searchStringArray));
+		$e = new mb_notice("Number of used searchstrings: ".count($searchStringArray));
 		//textsearch
 		
 		if ($this->searchText != NULL) {
@@ -808,7 +808,7 @@
 				$e = new mb_notice("Part of string".$i.": ".$searchStringArray[$i]);
 				$e = new mb_notice("converted: ".$this->replaceChars_all($searchStringArray[$i]));			
 				$va = "%".trim(strtoupper($this->replaceChars_all($searchStringArray[$i])))."%";
-				$e = new mb_exception($this->searchResources." Searchtext in SQL: ".$va);
+				$e = new mb_notice($this->searchResources." Searchtext in SQL: ".$va);
 				array_push($v,$va);
 				array_push($t,"s");	
 			}
@@ -833,14 +833,14 @@
 				$postgisVersionArray = explode(" ",$postgisVersion);
 				$postgisVersionSmall = explode(".",$postgisVersionArray[0]);
 				$postgisSubNumber = $postgisVersionSmall[1];
-				$e = new mb_exception("class_metadata.php: postgis sub number = ".$postgisSubNumber);
+				$e = new mb_notice("class_metadata.php: postgis sub number = ".$postgisSubNumber);
 			}
 			//
 			//
-			$e = new mb_exception("class_metadata.php: spatial operator: ".$this->searchTypeBbox);
+			$e = new mb_notice("class_metadata.php: spatial operator: ".$this->searchTypeBbox);
 			if ((integer)$postgisSubNumber >= 3){
 				#$spatialFilter = "(the_geom ";	
-				$e = new mb_exception("class_metadata.php: spatial operator: ".$this->searchTypeBbox);
+				$e = new mb_notice("class_metadata.php: spatial operator: ".$this->searchTypeBbox);
 				if ($this->searchTypeBbox == 'outside') {
 					$spatialFilter = ' disjoint(';
 				} elseif ($this->searchTypeBbox == 'inside') { 
@@ -993,7 +993,7 @@
 		//defining range for paging
 		$sql .= " LIMIT ".$limit." OFFSET ".$offset."";
 		//Print out search SQL term
-		$e = new mb_exception("class_metadata.php: Search => SQL-Request of ".$this->searchResources." service metadata: ".$sql."");
+		$e = new mb_notice("class_metadata.php: Search => SQL-Request of ".$this->searchResources." service metadata: ".$sql."");
 		//parameter: searchId -> can be used global, searchResources -> is only one type per instance!!-> global,which categories -> can be defined global! $whereStr
 		$n = $this->writeCategories($whereStr, $v, $t); 
 		//write counts to filesystem to avoid to many database connections
@@ -1087,7 +1087,7 @@
 						$searchUrlKeywords = $this->delTotalFromQuery('searchResources',$this->searchURL);
 						//append the resource parameter:
 						$searchUrlKeywords .= '&searchResources='.$this->searchResources;
-						$e = new mb_exception("class_metadata_new: value ".$paramValue." for searchText param found");
+						$e = new mb_notice("class_metadata_new: value ".$paramValue." for searchText param found");
 						$paramValue = urldecode($paramValue);
 						if ($paramValue == false || $paramValue == '*') {
 							$this->keyJSON->tagCloud->tags[$j]->url = $searchUrlKeywords."&searchText=".$keywordCounts[$j]['keyword'];
@@ -1216,13 +1216,13 @@
 					echo "<br>DEBUG: show categories: <br>".$this->catJSON."<br><br>";
 				}
 			} else {
-				$e = new mb_exception("class_metadata: ".$this->searchResources."_class_file: ".$filename." already exists - no new one is generated!");				
+				$e = new mb_notice("class_metadata: ".$this->searchResources."_class_file: ".$filename." already exists - no new one is generated!");				
 			}	
 		} else {
 			if ($this->resultTarget == 'debug') {
 				echo "<br>DEBUG: Standard ID dummysearch was invoked - classifications won't be counted!<br>";
 			}
-			$e = new mb_exception("class_metadata: standard dummysearch was invoked - classifications won't be counted!");	
+			$e = new mb_notice("class_metadata: standard dummysearch was invoked - classifications won't be counted!");	
 		}			
 		return $n;
 	}
@@ -1301,11 +1301,11 @@
 			$asstr[0]='%';
 		}
 		//check for single wildcard search
-		$e = new mb_exception('class_metadata_new: searchText: '.$this->searchText);
+		$e = new mb_notice('class_metadata_new: searchText: '.$this->searchText);
 		if ((count($asstr) == 1) && (($asstr[0]=='*') || ($asstr[0]==='false'))) {
 			$asstr[0]='%';
 		}
-		$e = new mb_exception('class_metadata_new: asstr[0]: '.$asstr[0]);
+		$e = new mb_notice('class_metadata_new: asstr[0]: '.$asstr[0]);
 		return $asstr;
 	}			
 		
@@ -1558,7 +1558,7 @@
 		#$pattern = '/\b'.$paramName.'=([a-z0-9-]+)\&?/';
 		$pattern = '/\b&'.$paramName.'\=[^&]+&?/';
 		#$pattern = '/^&'.$paramName.'=[a-zA-ZöäüÖÄÜß,]*&$/';
-		$e = new mb_exception("class_metadata_new.php: look for pattern: ".$pattern."  in ".$queryString);
+		$e = new mb_notice("class_metadata_new.php: look for pattern: ".$pattern."  in ".$queryString);
  		if (!preg_match($pattern, $queryString, $matches)){
 			
 			return false;
@@ -1572,7 +1572,7 @@
 
 				return $requestString;
 			} else {
-				$e = new mb_exception("class_metadata_new.php: There are parameter ambiguities!");
+				$e = new mb_notice("class_metadata_new.php: There are parameter ambiguities!");
 				#echo "Parameter Ambiguities found!";
 				die();
 			}

Modified: trunk/mapbender/http/classes/class_wmc.php
===================================================================
--- trunk/mapbender/http/classes/class_wmc.php	2011-02-18 07:58:34 UTC (rev 7623)
+++ trunk/mapbender/http/classes/class_wmc.php	2011-02-18 09:29:27 UTC (rev 7624)
@@ -1038,7 +1038,7 @@
 
 	public function featuretypeConfToJavaScript() {
 		$wfsConfIds = $this->generalExtensionArray['WFSCONFIDSTRING'];
-		new mb_exception("app AAAA idstr $wfsConfIds");
+		new mb_notice("app AAAA idstr $wfsConfIds");
 		$featuretypeConfs = array();
 		$featuretypeConfArray = is_string($wfsConfIds) ?
 			explode(",", $wfsConfIds) : array();

Modified: trunk/mapbender/http/geoportal/gaz.php
===================================================================
--- trunk/mapbender/http/geoportal/gaz.php	2011-02-18 07:58:34 UTC (rev 7623)
+++ trunk/mapbender/http/geoportal/gaz.php	2011-02-18 09:29:27 UTC (rev 7624)
@@ -26,14 +26,14 @@
 require_once(dirname(__FILE__)."/../classes/class_administration.php");
 require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
 
-$n = new mb_exception("-- gaz.php was invoked--");
+$n = new mb_notice("-- gaz.php was invoked--");
 $con = db_connect(DBSERVER,OWNER,PW);
 db_select_db(DB,$con);
 
 $resdir = RESULT_DIR;
 //exception wrapper
 function throwE($t){
-	$e = new mb_exception("portal search: ".$t."!");
+	$e = new mb_notice("portal search: ".$t."!");
 }
 
 (isset($_SERVER["argv"][1]))? ($userId = $_SERVER["argv"][1]) : (throwE('userId lacks ...'));

Modified: trunk/mapbender/http/javascripts/mod_savewmc.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_savewmc.php	2011-02-18 07:58:34 UTC (rev 7623)
+++ trunk/mapbender/http/javascripts/mod_savewmc.php	2011-02-18 09:29:27 UTC (rev 7624)
@@ -11,7 +11,7 @@
 
 //get language parameter out of mapbender session if it is set else set default language to de_DE
 if (isset($_SESSION['mb_lang']) && ($_SESSION['mb_lang']!='')) {
-	$e = new mb_exception("javascripts/mod_savewmc.php: language found in session: ".$_SESSION['mb_lang']);
+	$e = new mb_notice("javascripts/mod_savewmc.php: language found in session: ".$_SESSION['mb_lang']);
 	$language = $_SESSION["mb_lang"];
 	$langCode = explode("_", $language);
 	$langCode = $langCode[0]; # Hopefully de or s.th. else

Modified: trunk/mapbender/http/php/mb_validateSession.php
===================================================================
--- trunk/mapbender/http/php/mb_validateSession.php	2011-02-18 07:58:34 UTC (rev 7623)
+++ trunk/mapbender/http/php/mb_validateSession.php	2011-02-18 09:29:27 UTC (rev 7624)
@@ -78,7 +78,7 @@
 	$lang = $testMatch;
 	//set the 
 	Mapbender::session()->set("mb_lang",$lang);
-	$e = new mb_exception("mb_validateSession.php: lang was set by GET to: " .$lang);
+	$e = new mb_notice("mb_validateSession.php: lang was set by GET to: " .$lang);
 	$testMatch = NULL;
 }
 //

Modified: trunk/mapbender/http/php/mod_callMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_callMetadata.php	2011-02-18 07:58:34 UTC (rev 7623)
+++ trunk/mapbender/http/php/mod_callMetadata.php	2011-02-18 09:29:27 UTC (rev 7624)
@@ -936,7 +936,7 @@
 		$str .= "'".$hostName."' ";
 		$str .= "'".$orderBy."' ";
 		$str .= " & ";
-		$e = new mb_exception($str);
+		$e = new mb_notice($str);
 		exec($str);
 	}
 }

Modified: trunk/mapbender/http/php/mod_savewmc_server.php
===================================================================
--- trunk/mapbender/http/php/mod_savewmc_server.php	2011-02-18 07:58:34 UTC (rev 7623)
+++ trunk/mapbender/http/php/mod_savewmc_server.php	2011-02-18 09:29:27 UTC (rev 7624)
@@ -49,7 +49,7 @@
 //$e = new mb_exception('mod_savewmc_server.php: mapObject is here ;-)');
 $mapObject = $json->decode($mapObject);
 
-$e = new mb_exception('mod_savewmc_server.php: mapObject has been decoded from json');
+$e = new mb_notice('mod_savewmc_server.php: mapObject has been decoded from json');
 
 // create WMC object
 $wmc = new wmc();

Modified: trunk/mapbender/http/php/mod_showMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_showMetadata.php	2011-02-18 07:58:34 UTC (rev 7623)
+++ trunk/mapbender/http/php/mod_showMetadata.php	2011-02-18 09:29:27 UTC (rev 7624)
@@ -29,14 +29,14 @@
 //languageCode: de, en, fr
 //get language parameter out of mapbender session if it is set else set default language to de_DE
 if (isset($_SESSION['mb_lang']) && ($_SESSION['mb_lang']!='')) {
-	$e = new mb_exception("mod_showMetadata.php: language found in session: ".$_SESSION['mb_lang']);
+	$e = new mb_notice("mod_showMetadata.php: language found in session: ".$_SESSION['mb_lang']);
 	$language = $_SESSION["mb_lang"];
 	$langCode = explode("_", $language);
 	$langCode = $langCode[0]; # Hopefully de or s.th. else
 	$languageCode = $langCode; #overwrite the GET Parameter with the SESSION information
 }
-$e = new mb_exception("mod_showMetadata.php: language in SESSION: ".$_SESSION['mb_lang']);
-$e = new mb_exception("mod_showMetadata.php: new language: ".$languageCode);
+$e = new mb_notice("mod_showMetadata.php: language in SESSION: ".$_SESSION['mb_lang']);
+$e = new mb_notice("mod_showMetadata.php: new language: ".$languageCode);
 
 $layout = 'tabs';
 //Parse REQUEST Parameters
@@ -484,7 +484,7 @@
 
 
 
-$e = new mb_exception("mod_showMetadata: mb_group_name: ".$metadataContactGroup['mb_group_name']);
+$e = new mb_notice("mod_showMetadata: mb_group_name: ".$metadataContactGroup['mb_group_name']);
 //db select for layer previews
 if ($resource == 'wms' or $resource == 'layer') {
 	$sqlP = "SELECT * FROM layer_preview WHERE fkey_layer_id = $1 LIMIT 1";
@@ -910,7 +910,7 @@
 	$tou = $touServiceConnector->file;
 }
 if ($resource == 'wmc' ) {
-	$e = new mb_exception("mod_showMetadata: wmcid for disclaimer: ".$resourceMetadata['contentid']);
+	$e = new mb_notice("mod_showMetadata: wmcid for disclaimer: ".$resourceMetadata['contentid']);
 	$touWmcConnector = new connector($mapbenderProtocol."localhost".$_SERVER['SCRIPT_NAME']."/../mod_getWmcDisclaimer.php?&id=".$resourceMetadata['contentid']."&languageCode=".$languageCode."&hostName=".$hostName);
 	$tou = $touWmcConnector->file;
 }

Modified: trunk/mapbender/lib/class_Mapbender_session.php
===================================================================
--- trunk/mapbender/lib/class_Mapbender_session.php	2011-02-18 07:58:34 UTC (rev 7623)
+++ trunk/mapbender/lib/class_Mapbender_session.php	2011-02-18 09:29:27 UTC (rev 7624)
@@ -84,7 +84,7 @@
  			return true;
  		}
  		else{
- 			new mb_exception("exists(): The session variable: ".$name." is not set!'");
+ 			new mb_notice("exists(): The session variable: ".$name." is not set!'");
  			return false;
  		}
  		session_write_close();



More information about the Mapbender_commits mailing list