[Mapbender-commits] r3000 - branches/2.5/owsproxy/http
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Sep 25 08:36:29 EDT 2008
Author: verenadiewald
Date: 2008-09-25 08:36:28 -0400 (Thu, 25 Sep 2008)
New Revision: 3000
Modified:
branches/2.5/owsproxy/http/index.php
Log:
http://trac.osgeo.org/mapbender/ticket/269 + own switch case for 'map'
Modified: branches/2.5/owsproxy/http/index.php
===================================================================
--- branches/2.5/owsproxy/http/index.php 2008-09-25 08:21:26 UTC (rev 2999)
+++ branches/2.5/owsproxy/http/index.php 2008-09-25 12:36:28 UTC (rev 3000)
@@ -42,6 +42,8 @@
$notice = new mb_notice("owsproxy id:".$query->getOwsproxyServiceId());
// check session
+session_regenerate_id();
+session_destroy();
session_id($_REQUEST["sid"]);
session_start();
if(!$_SESSION['mb_user_id']){
@@ -70,7 +72,7 @@
$request = $query->getRequest();
getFeatureInfo($request);
break;
- case 'getmap' || 'map':
+ case 'getmap':
$arrayOnlineresources = checkWmsPermission($owsproxyService);
$query->setOnlineResource($arrayOnlineresources['wms_getmap']);
$layers = checkLayerPermission($arrayOnlineresources['wms_id'],$reqParams['layers']);
@@ -82,9 +84,21 @@
$request = $query->getRequest();
getImage($request);
break;
+ case 'map':
+ $arrayOnlineresources = checkWmsPermission($owsproxyService);
+ $query->setOnlineResource($arrayOnlineresources['wms_getmap']);
+ $layers = checkLayerPermission($arrayOnlineresources['wms_id'],$reqParams['layers']);
+ if($layers===""){
+ throwE("Permission denied");
+ die();
+ }
+ $query->setParam("layers",$layers);
+ $request = $query->getRequest();
+ getImage($request);
+ break;
case 'getlegendgraphic':
- $url = getLegendUrl($query->getOwsproxyServiceId());
- getImage($url);
+ $url = getLegendUrl($query->getOwsproxyServiceId());
+ getImage($url);
break;
case 'external':
getExternalRequest($query->getOwsproxyServiceId());
@@ -393,7 +407,7 @@
* @return string url to legend graphic
*/
function getLegendUrl($wms){
- global $reqParams;
+ global $reqParams;
//get wms id
$sql = "SELECT * FROM wms WHERE wms_owsproxy = $1";
More information about the Mapbender_commits
mailing list