[fusion-commits] r2293 - trunk/layers/MapServer/php
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Dec 2 15:53:54 EST 2010
Author: madair
Date: 2010-12-02 12:53:54 -0800 (Thu, 02 Dec 2010)
New Revision: 2293
Modified:
trunk/layers/MapServer/php/Query.php
Log:
re #419: use a different index variable in the inner loop
Modified: trunk/layers/MapServer/php/Query.php
===================================================================
--- trunk/layers/MapServer/php/Query.php 2010-11-29 02:30:26 UTC (rev 2292)
+++ trunk/layers/MapServer/php/Query.php 2010-12-02 20:53:54 UTC (rev 2293)
@@ -182,16 +182,17 @@
$oLayer = $oMap->GetLayer($i);
}
$oLayer->set('tolerance', 0);
- if ($oLayer->type != MS_LAYER_RASTER)
- continue;
+ if ($oLayer->type != MS_LAYER_RASTER) {
+ continue;
+ }
$aProcessings = $oLayer->getprocessing();
$nCount = count($aProcessings);
$bRasterMaxSet = 0;
- for ($i=0;$i<$nCount; $i++)
+ for ($j=0;$j<$nCount; $j++)
{
- $aKeyVal = explode("=", $aProcessings[$i]);
+ $aKeyVal = explode("=", $aProcessings[$j]);
if (count($aKeyVal) == 2 &&
strcasecmp(trim($aKeyVal[0]), "RASTER_QUERY_MAX_RESULT") == 0)
{
@@ -200,8 +201,9 @@
}
}
- if (!$bRasterMaxSet)
+ if (!$bRasterMaxSet) {
$oLayer->setprocessing("RASTER_QUERY_MAX_RESULT=100");
+ }
/*are we doing a point query? In that case maxfeatures was set to 1*/
/*this is not ideal but It is better to use querybypoint when we do point query and
@@ -212,8 +214,9 @@
$oPoint = $oSpatialFilter->getCentroid();
$status = $oLayer->queryByPoint($oPoint, MS_SINGLE, -1);
}
- else
+ else {
$status = @$oLayer->queryByShape($oSpatialFilter);
+ }
if ($status == MS_SUCCESS) {
$result->hasSelection = true;
More information about the fusion-commits
mailing list