[Mapbender-commits] r5828 - branches/2.6/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Mar 23 09:01:06 EDT 2010


Author: christoph
Date: 2010-03-23 09:01:05 -0400 (Tue, 23 Mar 2010)
New Revision: 5828

Modified:
   branches/2.6/http/classes/class_gml2.php
   branches/2.6/http/classes/class_gml_2_factory.php
   branches/2.6/http/classes/class_gml_factory.php
   branches/2.6/http/classes/class_gml_geometry.php
   branches/2.6/http/classes/class_locale.php
   branches/2.6/http/classes/class_stripRequest.php
   branches/2.6/http/classes/class_weldMaps2PNG.php
   branches/2.6/http/classes/class_wfsToDb.php
   branches/2.6/http/classes/class_wmc.php
   branches/2.6/http/classes/class_wmcToXml.php
Log:
minor merges from trunk

Modified: branches/2.6/http/classes/class_gml2.php
===================================================================
--- branches/2.6/http/classes/class_gml2.php	2010-03-22 17:49:17 UTC (rev 5827)
+++ branches/2.6/http/classes/class_gml2.php	2010-03-23 13:01:05 UTC (rev 5828)
@@ -537,6 +537,7 @@
 						case "gml:Envelope" :
 							$this->geometry = new GMLEnvelope();
 							$this->geometry->parseEnvelope($geomNode);
+							break;
 						default:
 							$this->properties[$columnName] = $value;
 							break;

Modified: branches/2.6/http/classes/class_gml_2_factory.php
===================================================================
--- branches/2.6/http/classes/class_gml_2_factory.php	2010-03-22 17:49:17 UTC (rev 5827)
+++ branches/2.6/http/classes/class_gml_2_factory.php	2010-03-23 13:01:05 UTC (rev 5828)
@@ -92,7 +92,7 @@
 
 				list($x,$y,$z) = explode(',',$pointCoords);
 				$gmlPolygon->addPoint($x, $y);
-				}
+			}
 			
 			$cnt++;
 		}

Modified: branches/2.6/http/classes/class_gml_factory.php
===================================================================
--- branches/2.6/http/classes/class_gml_factory.php	2010-03-22 17:49:17 UTC (rev 5827)
+++ branches/2.6/http/classes/class_gml_factory.php	2010-03-23 13:01:05 UTC (rev 5828)
@@ -48,7 +48,7 @@
 
 		// check if valid feature collection
 		if (strtoupper($jsonObj->type) != "FEATURECOLLECTION" || !is_array($jsonObj->features)) {
-			$e = new mb_exception("Not a valid GeoJSON Feature Collection.");
+			$e = new mb_exception("Not a valid GeoJSON Feature Collection: " . $geoJson);
 			return null;
 		}
 

Modified: branches/2.6/http/classes/class_gml_geometry.php
===================================================================
--- branches/2.6/http/classes/class_gml_geometry.php	2010-03-22 17:49:17 UTC (rev 5827)
+++ branches/2.6/http/classes/class_gml_geometry.php	2010-03-23 13:01:05 UTC (rev 5828)
@@ -33,7 +33,8 @@
 	public $srs;
 	
 	public $latLonSrs = array(
-		"urn:x-ogc:def:crs:EPSG:4326"
+		"urn:x-ogc:def:crs:EPSG:4326",
+		"urn:x-ogc:def:crs:EPSG:31467"
 	);
 }
 ?>
\ No newline at end of file

Modified: branches/2.6/http/classes/class_locale.php
===================================================================
--- branches/2.6/http/classes/class_locale.php	2010-03-22 17:49:17 UTC (rev 5827)
+++ branches/2.6/http/classes/class_locale.php	2010-03-23 13:01:05 UTC (rev 5828)
@@ -150,16 +150,16 @@
          * @returns true if the language is supported; otherwise false
          */
         function isKnownLanguage($languageId) {
-                if ($this->knownLanguages == null) {
-                        $this->setKnownLanguages();
-                }
-                if (array_key_exists($languageId, $this->knownLanguages)) {
-                        return true;
-                }
-                else {
-                        $e = new Mb_notice("language " . $languageId . " not supported.");
-                }
-                return false;
+			if ($this->knownLanguages == null) {
+				$this->setKnownLanguages();
+			}
+			if (array_key_exists($languageId, $this->knownLanguages)) {
+				return true;
+			}
+			else {
+				$e = new Mb_notice("language " . $languageId . " not supported.");
+			}
+			return false;
         }
 
 

Modified: branches/2.6/http/classes/class_stripRequest.php
===================================================================
--- branches/2.6/http/classes/class_stripRequest.php	2010-03-22 17:49:17 UTC (rev 5827)
+++ branches/2.6/http/classes/class_stripRequest.php	2010-03-23 13:01:05 UTC (rev 5828)
@@ -142,7 +142,7 @@
 		$this->encodeGET();
 		return $this->url;
 	}
-	function encodeGET(){
+	function encodeGET($encode = true){
 		$a = explode("?",$this->url);
 		$patterns = explode("&", $a[1]);
 		$a[0].= "?";
@@ -153,7 +153,11 @@
 				$a[0] .= $tmp[0]."=";
 				for($ii=0; $ii<count($val); $ii++){
 					if($ii>0){$a[0].=",";}
+					if($encode){
 						$a[0].= urlencode($val[$ii]);
+					}else{
+						$a[0].= $val[$ii];
+					}
 				}
 				if ($i < (count($patterns)-1)) {
 					$a[0] .= "&";

Modified: branches/2.6/http/classes/class_weldMaps2PNG.php
===================================================================
--- branches/2.6/http/classes/class_weldMaps2PNG.php	2010-03-22 17:49:17 UTC (rev 5827)
+++ branches/2.6/http/classes/class_weldMaps2PNG.php	2010-03-23 13:01:05 UTC (rev 5828)
@@ -29,7 +29,7 @@
 
 class weldMaps2PNG{
 
-	function weldMaps2PNG($urls,$filename){
+	function weldMaps2PNG($urls,$filename, $encode = true){
 		if(!$urls || $urls == ""){
 			$e = new mb_exception("weldMaps2PNG: no maprequests delivered");
 		}
@@ -46,7 +46,7 @@
 			$obj = new stripRequest($url[$i]);
 
 			$url[$i] = $obj->setPNG();
-			$url[$i] = $obj->encodeGET();
+			$url[$i] = $obj->encodeGET($encode);
 			$img = $this->loadpng($url[$i]);
 			if($img != false){
 				imagecopy($image, $img, 0, 0, 0, 0, $width, $height);

Modified: branches/2.6/http/classes/class_wfsToDb.php
===================================================================
--- branches/2.6/http/classes/class_wfsToDb.php	2010-03-22 17:49:17 UTC (rev 5827)
+++ branches/2.6/http/classes/class_wfsToDb.php	2010-03-23 13:01:05 UTC (rev 5828)
@@ -328,7 +328,7 @@
 				$sqlInsertConfElement .= "f_mandatory, f_auth_varname, f_show_detail, f_operator,";
 				$sqlInsertConfElement .= "f_detailpos, f_min_input) VALUES";
 
-				$sqlInsertConfElement .= "($1, $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18)";
+				$sqlInsertConfElement .= "($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18)";
 
 				$v = array($wfsConfId, $aWfsFeatureTypeElement->id,0,0,0,0,'',0,0,0,'',0,0,'',0,'',0,0);
 				$t = array("i", "i","i", "i","i", "i","s","i","i","i","s","i","i","s","i","s","i","i");

Modified: branches/2.6/http/classes/class_wmc.php
===================================================================
--- branches/2.6/http/classes/class_wmc.php	2010-03-22 17:49:17 UTC (rev 5827)
+++ branches/2.6/http/classes/class_wmc.php	2010-03-23 13:01:05 UTC (rev 5828)
@@ -272,7 +272,7 @@
 	 * @param $id String the WMC id
 	 */
 	public static function getDocument ($id) {
-		$sql = "SELECT wmc FROM mb_user_wmc WHERE wmc_id = $1 AND fkey_user_id = $2 ";
+		$sql = "SELECT wmc FROM mb_user_wmc WHERE wmc_id = $1 AND fkey_user_id = $2";
 		$v = array($id, $_SESSION["mb_user_id"]);
 		$t = array('s', 'i');
 		$res = db_prep_query($sql,$v,$t);

Modified: branches/2.6/http/classes/class_wmcToXml.php
===================================================================
--- branches/2.6/http/classes/class_wmcToXml.php	2010-03-22 17:49:17 UTC (rev 5827)
+++ branches/2.6/http/classes/class_wmcToXml.php	2010-03-23 13:01:05 UTC (rev 5828)
@@ -438,7 +438,11 @@
 				);
 			}
 		}
-		
+
+		if ($currentLayer->gui_layer_wfs_featuretype !== "") {
+			$layerExtensionData["wfsFeatureType"] = $currentLayer->gui_layer_wfs_featuretype;
+		}
+
 		if ($currentOverviewLayer != null) {
 			$layerExtensionData["overviewData"] = array("overviewHidden" => ($currentOverviewLayer->gui_layer_visible ? 0 : 1));
 		}



More information about the Mapbender_commits mailing list