@@ -437,18 +437,21 @@ QDomDocument QgsWMSServer::getCapabilities( QString version, bool fullProjectInf
437
437
elem.appendChild ( dcpTypeElement.cloneNode ().toElement () ); // this is the same as for 'GetCapabilities'
438
438
requestElement.appendChild ( elem );
439
439
440
- // wms:GetPrint
441
- elem = doc.createElement ( ( version == " 1.1.1" ? " GetPrint" : " qgs:GetPrint" ) /* wms:GetPrint*/ );
442
- appendFormats ( doc, elem, QStringList () << " svg" << " png" << " pdf" );
443
- elem.appendChild ( dcpTypeElement.cloneNode ().toElement () ); // this is the same as for 'GetCapabilities'
444
- requestElement.appendChild ( elem );
440
+ if ( fullProjectInformation ) // remove composer templates from GetCapabilities in the long term
441
+ {
442
+ // wms:GetPrint
443
+ elem = doc.createElement ( " GetPrint" /* wms:GetPrint*/ );
444
+ appendFormats ( doc, elem, QStringList () << " svg" << " png" << " pdf" );
445
+ elem.appendChild ( dcpTypeElement.cloneNode ().toElement () ); // this is the same as for 'GetCapabilities'
446
+ requestElement.appendChild ( elem );
447
+ }
445
448
446
449
// Exception element is mandatory
447
450
elem = doc.createElement ( " Exception" );
448
451
appendFormats ( doc, elem, QStringList () << ( version == " 1.1.1" ? " application/vnd.ogc.se_xml" : " text/xml" ) );
449
452
capabilityElement.appendChild ( elem );
450
453
451
- if ( mConfigParser /* && fullProjectInformation*/ ) // remove composer templates from GetCapabilities in the long term
454
+ if ( mConfigParser && fullProjectInformation ) // remove composer templates from GetCapabilities in the long term
452
455
{
453
456
// Insert <ComposerTemplate> elements derived from wms:_ExtendedCapabilities
454
457
mConfigParser ->printCapabilities ( capabilityElement, doc );
0 commit comments