[Mapbender-commits] r10018 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Dec 17 05:22:00 PST 2018
Author: armin11
Date: 2018-12-17 05:22:00 -0800 (Mon, 17 Dec 2018)
New Revision: 10018
Modified:
trunk/mapbender/http/classes/class_metadata.php
Log:
Fix resultlist for wfs in json format - reindex array before returning json
Modified: trunk/mapbender/http/classes/class_metadata.php
===================================================================
--- trunk/mapbender/http/classes/class_metadata.php 2018-12-14 13:35:41 UTC (rev 10017)
+++ trunk/mapbender/http/classes/class_metadata.php 2018-12-17 13:22:00 UTC (rev 10018)
@@ -406,7 +406,6 @@
),
'srv' => array()
);
-
//read out records
$serverCount = 0;
$wfsMatrix = db_fetch_all($res);
@@ -493,9 +492,7 @@
#}
//check if module is given
if (isset($wfsMatrix[$i]['wfs_conf_id']) && $wfsMatrix[$i]['wfs_conf_id'] != "") {
-
//if modul hasn't been created - do it
-
if (!isset($this->wfsJSON->wfs->srv[$i-$j]->ftype[$l-$m]->modul)) {
$this->wfsJSON->wfs->srv[$i-$j]->ftype[$l-$m]->modul = array();
}
@@ -519,22 +516,19 @@
if ($wfsMatrix[$i]['wfs_id'] == $wfsMatrix[$i+1]['wfs_id']){
$j++; //next record is the same service
$l++;
- }
- else
- {
+ } else {
$l = 0;
}
-
if ($wfsMatrix[$i]['featuretype_id'] == $wfsMatrix[$i+1]['featuretype_id']){
$m++;
- }
- else
- {
+ } else {
$m = 0;
- }
- }
-
+ }
+ //alter ftype to array - not associative array - built new sequence
+ $this->wfsJSON->wfs->srv[$i-$j]->ftype = array_values($this->wfsJSON->wfs->srv[$i-$j]->ftype);
+ }
}
+
private function generateWMCMetadataJSON($res, $n) {
//initialize object
$this->wmcJSON = new stdClass;
More information about the Mapbender_commits
mailing list