[Mapbender-commits] r5026 - branches/2.6/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Nov 24 05:01:15 EST 2009
Author: verenadiewald
Date: 2009-11-24 05:01:11 -0500 (Tue, 24 Nov 2009)
New Revision: 5026
Modified:
branches/2.6/http/php/mod_customTree_server.php
Log:
check if wms exists still in gui
Modified: branches/2.6/http/php/mod_customTree_server.php
===================================================================
--- branches/2.6/http/php/mod_customTree_server.php 2009-11-24 10:00:33 UTC (rev 5025)
+++ branches/2.6/http/php/mod_customTree_server.php 2009-11-24 10:01:11 UTC (rev 5026)
@@ -114,18 +114,27 @@
$res = db_prep_query($sql,$v,$t);
$nodeArray = array();
+
+ //check if wms exists in gui
+ $n = new administration();
+ $applicationArray = array($applicationId);
+ $mywms = $n->getWmsByOwnGuis($applicationArray);
+
while ($row = db_fetch_array($res)) {
$wmsIdArray = explode(",", $row["wms_id"]);
$wmsArray = array();
+
foreach ($wmsIdArray as $wmsId) {
- if (is_numeric($wmsId)) {
- $sqlWms = "SELECT wms_title FROM wms WHERE wms_id = $1";
- $vWms = array($wmsId);
- $tWms = array("i");
- $resWms = db_prep_query($sqlWms, $vWms, $tWms);
- $rowWms = db_fetch_array($resWms);
- $wmsArray[$wmsId] = $rowWms[0];
+ if (in_array($wmsId, $mywms)) {
+ if (is_numeric($wmsId)) {
+ $sqlWms = "SELECT wms_title FROM wms WHERE wms_id = $1";
+ $vWms = array($wmsId);
+ $tWms = array("i");
+ $resWms = db_prep_query($sqlWms, $vWms, $tWms);
+ $rowWms = db_fetch_array($resWms);
+ $wmsArray[$wmsId] = $rowWms[0];
+ }
}
}
$currentNode = array(
More information about the Mapbender_commits
mailing list