[Mapbender-commits] r7193 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Dec 8 05:58:17 EST 2010
Author: christoph
Date: 2010-12-08 02:58:17 -0800 (Wed, 08 Dec 2010)
New Revision: 7193
Modified:
trunk/mapbender/http/classes/class_wfs_1_0_factory.php
trunk/mapbender/http/classes/class_wfs_1_1_factory.php
Log:
#737
Modified: trunk/mapbender/http/classes/class_wfs_1_0_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs_1_0_factory.php 2010-12-07 10:27:49 UTC (rev 7192)
+++ trunk/mapbender/http/classes/class_wfs_1_0_factory.php 2010-12-08 10:58:17 UTC (rev 7193)
@@ -173,15 +173,21 @@
if($section == "featuretype" && $tag == "SRS"){
$featuretype_srs = $element[value];
- $currentFeatureType = $this->createFeatureTypeFromUrl($myWfs, $featuretype_name);
- if ($currentFeatureType !== null) {
- $currentFeatureType->name = $featuretype_name;
- $currentFeatureType->title = $featuretype_title;
- $currentFeatureType->summary = $featuretype_abstract;
- $currentFeatureType->srs = $featuretype_srs;
+ // Do not add defective featuretypes
+ try {
+ $currentFeatureType = $this->createFeatureTypeFromUrl($myWfs, $featuretype_name);
+ if ($currentFeatureType !== null) {
+ $currentFeatureType->name = $featuretype_name;
+ $currentFeatureType->title = $featuretype_title;
+ $currentFeatureType->summary = $featuretype_abstract;
+ $currentFeatureType->srs = $featuretype_srs;
- $myWfs->addFeatureType($currentFeatureType);
+ $myWfs->addFeatureType($currentFeatureType);
+ }
}
+ catch (Exception $e) {
+ new mb_exception("Failed to load featuretype " . $featuretype_name);
+ }
}
}
return $myWfs;
Modified: trunk/mapbender/http/classes/class_wfs_1_1_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs_1_1_factory.php 2010-12-07 10:27:49 UTC (rev 7192)
+++ trunk/mapbender/http/classes/class_wfs_1_1_factory.php 2010-12-08 10:58:17 UTC (rev 7193)
@@ -215,15 +215,21 @@
if($section == "featuretype" && $tag == "DEFAULTSRS"){
$featuretype_srs = $element[value];
- $currentFeatureType = $this->createFeatureTypeFromUrlGet($myWfs, $featuretype_name, $featureTypeNsArray);
- if ($currentFeatureType !== null) {
- $currentFeatureType->name = $featuretype_name;
- $currentFeatureType->title = $featuretype_title;
- $currentFeatureType->summary = $featuretype_abstract;
- $currentFeatureType->srs = $featuretype_srs;
+ // Do not add defective featuretypes
+ try {
+ $currentFeatureType = $this->createFeatureTypeFromUrlGet($myWfs, $featuretype_name, $featureTypeNsArray);
+ if ($currentFeatureType !== null) {
+ $currentFeatureType->name = $featuretype_name;
+ $currentFeatureType->title = $featuretype_title;
+ $currentFeatureType->summary = $featuretype_abstract;
+ $currentFeatureType->srs = $featuretype_srs;
- $myWfs->addFeatureType($currentFeatureType);
+ $myWfs->addFeatureType($currentFeatureType);
+ }
}
+ catch (Exception $e) {
+ new mb_exception("Failed to load featuretype " . $featuretype_name);
+ }
}
}
if (!$myWfs->title) {
More information about the Mapbender_commits
mailing list