Skip to content

Commit

Permalink
Enabled WFS sortby for Oracle plugin, quoted sortby parameter to enab…
Browse files Browse the repository at this point in the history
…le non-capitalized column names
  • Loading branch information
micking committed Jun 28, 2017
1 parent 89810ed commit c08e349
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions maplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ int msLayerApplyPlainFilterToLayer(FilterEncodingNode *psNode, mapObj *map, int
int msLayerSupportsSorting(layerObj *layer)
{
if (layer && (
(layer->connectiontype == MS_OGR) || (layer->connectiontype == MS_POSTGIS) || (layer->connectiontype == MS_ORACLESPATIAL)
(layer->connectiontype == MS_OGR) || (layer->connectiontype == MS_POSTGIS) || (layer->connectiontype == MS_ORACLESPATIAL) || ((layer->connectiontype == MS_PLUGIN) && (strstr(layer->plugin_library,"msplugin_oracle") != NULL))
)
)
return MS_TRUE;
Expand Down Expand Up @@ -1604,7 +1604,8 @@ char* msLayerBuildSQLOrderBy(layerObj *layer)
if( layer->sortBy.nProperties > 0 ) {
int i;
for(i=0;i<layer->sortBy.nProperties;i++) {
char* escaped = msLayerEscapePropertyName(layer, layer->sortBy.properties[i].item);
char* escaped = msSmallMalloc(strlen(layer->sortBy.properties[i].item) + 3);
sprintf(escaped, "\"%s\"", layer->sortBy.properties[i].item);
if( i > 0 )
strOrderBy = msStringConcatenate(strOrderBy, ", ");
strOrderBy = msStringConcatenate(strOrderBy, escaped);
Expand Down

0 comments on commit c08e349

Please sign in to comment.