[Mapbender-commits] r2980 - branches/tree_dev/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Sep 18 09:35:24 EDT 2008
Author: christoph
Date: 2008-09-18 09:35:24 -0400 (Thu, 18 Sep 2008)
New Revision: 2980
Modified:
branches/tree_dev/http/php/mod_customTree_server.php
Log:
Modified: branches/tree_dev/http/php/mod_customTree_server.php
===================================================================
--- branches/tree_dev/http/php/mod_customTree_server.php 2008-09-18 13:28:02 UTC (rev 2979)
+++ branches/tree_dev/http/php/mod_customTree_server.php 2008-09-18 13:35:24 UTC (rev 2980)
@@ -28,7 +28,7 @@
case 'getApplications':
// get all of the users applications
- $allowedApplicationArray = $user->getApplicationsByPermission();
+ $allowedApplicationArray = $user->getApplicationsByPermission(0);
// get all of the users applications that contain treeGDE
$sql = "SELECT fkey_gui_id FROM gui_element WHERE " .
@@ -102,20 +102,22 @@
$wmsIdArray = explode(",", $row["wms_id"]);
$wmsArray = array();
foreach ($wmsIdArray as $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 (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(
"left" => $row["lft"],
"right" => $row["rgt"],
"name" => $row["my_layer_title"],
"wms" => $wmsArray
);
+
array_push($nodeArray, $currentNode);
}
$data = array("nodeArray" => $nodeArray);
More information about the Mapbender_commits
mailing list