Opened 12 years ago

Last modified 12 years ago

#170 closed defect

query.php - space not escaped — at Initial Version

Reported by: bfischer Owned by: bfischer
Priority: major Milestone: 2.6.1
Component: GeoMOOSE/PHP Version: 2.6
Keywords: Cc:

Description

We noticed that spaces were not being escaped in search strings. Also adding support for File geodatabase. Proposed revision to demo search_results.html to make it easy for users to use it. Were currently working on a patch to be submitted.

File Geodatabase support....
First of all, there is a problem querying .gdb files. None of the query results are being returned here http://gmtrunk.houstoneng.net/ because it is querying a .gdb file compared to http://www.geomoose.org/demo/geomoose.html where it is querying a shapefile. I got the fix for that from Mike Reynolds (http://lists.osgeo.org/pipermail/geomoose-users/2011-November/003484.html).

Query.php Line 241
$SQL_LAYER_TYPES = array(MS_POSTGIS, MS_ORACLESPATIAL, MS_OGR);
$NOT_SUPPORTED = array(MS_INLINE, MS_SDE, MS_WMS, MS_WFS, MS_GRATICULE, MS_RASTER, MS_PLUGIN);

TO
$SQL_LAYER_TYPES = array(MS_POSTGIS, MS_ORACLESPATIAL);
$NOT_SUPPORTED = array(MS_INLINE, MS_SDE, MS_WMS, MS_WFS, MS_GRATICULE, MS_RASTER, MS_PLUGIN, MS_OGR);

search_results proposed changes...
Propose using zoomToPoint function instead. It actually works better in my opinion since you don’t have to worry about those messy ids.

<a id="gm-parcel-[OBJECTID]" class='sprite-control sprite-control-find-selected' style="padding-left: 22px" parcel-shape="[shpxy]" href="javascript:GeoMOOSE.zoomToPointsList(dojo.byId('gm-parcel-[OBJECTID]').getAttribute('parcel-shape'), 'EPSG:29615');">[E911_ADD]</a>

TO
<a class='sprite-control sprite-control-find-selected' style="padding-left: 22px;” href="javascript:GeoMOOSE.zoomToPoint([shpxy],100);">[E911_ADD]</a>

Encode spaces in search value...
The value was being encoded when passed to the server. So a space would look like %20. I just added a urldecode function around the value and spaces work fine now, and I’m assuming any other character that is automatically encoded.

Query.php Line 211
$value = get_request_icase('value'.$i);

TO
$value = urldecode(get_request_icase('value'.$i));

Change History (0)

Note: See TracTickets for help on using tickets.