Permalink
Browse files

Enabled WFS sortby for Oracle plugin, quoted sortby parameter to enab…

…le non-capitalized column names
  • Loading branch information...
micking committed Apr 3, 2017
1 parent 89810ed commit c08e349300283ee39bba8955045d4b6cf6b3419f
Showing with 3 additions and 2 deletions.
  1. +3 −2 maplayer.c
View
@@ -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;
@@ -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);

0 comments on commit c08e349

Please sign in to comment.