Opened 12 years ago

Closed 12 years ago

#170 closed defect (fixed)

query.php - space not escaped

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

Description (last modified by bfischer)

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);

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 (4)

comment:1 by bfischer, 12 years ago

Status: newassigned

comment:2 by bfischer, 12 years ago

Description: modified (diff)

comment:3 by theduckylittle, 12 years ago

Status: assignedtesting

comment:4 by bfischer, 12 years ago

Resolution: fixed
Status: testingclosed
Note: See TracTickets for help on using tickets.