Skip to content

Commit

Permalink
Merge branch 'branch-6-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Aug 11, 2012
2 parents ddd4a53 + 674fd84 commit f8a567d
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 12 deletions.
4 changes: 2 additions & 2 deletions mapogcfiltercommon.c
Expand Up @@ -213,7 +213,7 @@ char *FLTGetIsBetweenComparisonCommonExpresssion(FilterEncodingNode *psFilterNod
if (aszBounds[0]) {
snprintf(szBuffer, bufferSize, "%s_type", psFilterNode->psLeftNode->pszValue);
if (msOWSLookupMetadata(&(lp->metadata), "OFG", szBuffer) != NULL &&
(strcasecmp(msOWSLookupMetadata(&(lp->metadata), "G", szBuffer), "Character") == 0))
(strcasecmp(msOWSLookupMetadata(&(lp->metadata), "OFG", szBuffer), "Character") == 0))
bString = 1;
else if (FLTIsNumeric(aszBounds[0]) == MS_FALSE)
bString = 1;
Expand Down Expand Up @@ -315,7 +315,7 @@ char *FLTGetBinaryComparisonCommonExpression(FilterEncodingNode *psFilterNode, l
if (psFilterNode->psRightNode->pszValue) {
snprintf(szTmp, sizeof(szTmp), "%s_type", psFilterNode->psLeftNode->pszValue);
if (msOWSLookupMetadata(&(lp->metadata), "OFG", szTmp) != NULL &&
(strcasecmp(msOWSLookupMetadata(&(lp->metadata), "G", szTmp), "Character") == 0))
(strcasecmp(msOWSLookupMetadata(&(lp->metadata), "OFG", szTmp), "Character") == 0))
bString = 1;
else if (FLTIsNumeric(psFilterNode->psRightNode->pszValue) == MS_FALSE)
bString = 1;
Expand Down
1 change: 1 addition & 0 deletions mapogcsld.c
Expand Up @@ -431,6 +431,7 @@ int msSLDApplySLD(mapObj *map, char *psSLDXML, int iLayer,
msLoadExpressionString(&lp->filter, pszBuffer);
}
msFree(pszBuffer);
pszBuffer = NULL;
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions mapows.c
Expand Up @@ -1019,6 +1019,12 @@ int msOWSPrintInspireCommonMetadata(FILE *stream, mapObj *map, const char *names

inspire_capabilities = msOWSLookupMetadata(&(map->web.metadata), namespaces, "inspire_capabilities");

if(!inspire_capabilities) {
if (OWS_WARN == action_if_not_found) {
msIO_fprintf(stream, "<!-- WARNING: missing metadata entry for 'inspire_capabilities', one of 'embed' and 'url' must be supplied. -->\n");
}
return action_if_not_found;
}
if (strcasecmp("url",inspire_capabilities) == 0) {
if ( msOWSLookupMetadata(&(map->web.metadata), namespaces, "inspire_metadataurl_href") != NULL ) {
msIO_fprintf(stream, " <inspire_common:MetadataUrl xsi:type=\"inspire_common:resourceLocatorType\">\n");
Expand Down
5 changes: 5 additions & 0 deletions mapscript/perl/.gitignore
@@ -0,0 +1,5 @@
blib/*
mapscript.bs
mapscript.pm
mapscript_wrap.c
pm_to_blib
2 changes: 1 addition & 1 deletion maputil.c
Expand Up @@ -2281,7 +2281,7 @@ char *msBuildOnlineResource(mapObj *map, cgiRequestObj *req)

if (hostname && port && script) {
size_t buffer_size;
buffer_size = strlen(hostname)+strlen(port)+strlen(script)+mapparam_len+10;
buffer_size = strlen(hostname)+strlen(port)+strlen(script)+mapparam_len+11; /* 11 comes from https://[host]:[port][scriptname]?[map]\0, i.e. "https://:?\0" */
online_resource = (char*)msSmallMalloc(buffer_size);
if ((atoi(port) == 80 && strcmp(protocol, "http") == 0) ||
(atoi(port) == 443 && strcmp(protocol, "https") == 0) )
Expand Down
5 changes: 4 additions & 1 deletion mapwfs.c
Expand Up @@ -2396,10 +2396,13 @@ this request. Check wfs/ows_enable_request settings.", "msWFSGetFeature()",
msIO_setHeader("Content-type",output_mime_type);
msIO_sendHeaders();

msWFSGetFeature_GMLPreamble( map, req, &gmlinfo, paramsObj,
status = msWFSGetFeature_GMLPreamble( map, req, &gmlinfo, paramsObj,
outputformat,
iResultTypeHits,
iNumberOfFeatures );
if(status != MS_SUCCESS) {
return MS_FAILURE;
}
}

/* handle case of maxfeatures = 0 */
Expand Down
19 changes: 11 additions & 8 deletions mapwfs11.c
Expand Up @@ -122,14 +122,17 @@ static xmlNodePtr msWFSDumpLayer11(mapObj *map, layerObj *lp, xmlNsPtr psNsOws)

/* add namespace to layer name */
value = msOWSLookupMetadata(&(map->web.metadata), "FO", "namespace_prefix");
n = strlen(value)+strlen(lp->name)+1+1;
valueToFree = (char *) msSmallMalloc(sizeof(char*)*n);
snprintf(valueToFree, n, "%s%s%s", (value ? value : ""), (value ? ":" : ""), lp->name);

/*if there is an encoding using it on some of the items*/
psNode = msOWSCommonxmlNewChildEncoded(psRootNode, NULL, "Name", valueToFree, encoding);

msFree(valueToFree);
if(value) {
n = strlen(value)+strlen(lp->name)+1+1;
valueToFree = (char *) msSmallMalloc(sizeof(char*)*n);
snprintf(valueToFree, n, "%s%s%s", (value ? value : ""), (value ? ":" : ""), lp->name);

/*if there is an encoding using it on some of the items*/
psNode = msOWSCommonxmlNewChildEncoded(psRootNode, NULL, "Name", valueToFree, encoding);
msFree(valueToFree);
} else {
psNode = msOWSCommonxmlNewChildEncoded(psRootNode, NULL, "Name", lp->name, encoding);
}

if (lp->name && strlen(lp->name) > 0 &&
(msIsXMLTagValid(lp->name) == MS_FALSE || isdigit(lp->name[0])))
Expand Down

0 comments on commit f8a567d

Please sign in to comment.