Преглед на файлове

fixed wfs table opis (Abstract in GetCapabilities)

Piotr Labudda преди 10 години
родител
ревизия
ec31094571
променени са 2 файла, в които са добавени 11 реда и са изтрити 4 реда
  1. 4 4
      SE/se-lib/Api/WfsServerBase.php
  2. 7 0
      SE/se-lib/TableAcl.php

+ 4 - 4
SE/se-lib/Api/WfsServerBase.php

@@ -533,7 +533,7 @@ class Api_WfsServerBase {
 			$featureType = array();
 			$featureType['ns'] = "p5_{$dataSourceName}";
 			$featureType['Title'] = $tblAcl->getRawLabel();
-			$featureType['Abstract'] = $tblAcl->getRawLabel();
+			$featureType['Abstract'] = $tblAcl->getRawOpis();
 			$featureType['Keywords'] = array();
 			$featureType['Keywords'][] = $tblAcl->getID();
 			$featureType['Keywords'][] = $tblName;
@@ -978,14 +978,13 @@ EOF;
 			$deleteActionsXsd = '';
 		}
 
-		$convertTransactionXslString = <<<EOF
-<?xml version="1.0"?>
+		$convertTransactionXslString = '<?xml version="1.0"?>';
+		$convertTransactionXslString .= <<<EOF
 <xsl:transform version="1.0"
 							 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 							 xmlns:wfs="http://www.opengis.net/wfs"
 							 xmlns:ogc="http://www.opengis.net/ogc"
 							 xmlns:gml="http://www.opengis.net/gml">
-
 	<xsl:template match="/">
 		<xsl:for-each select="wfs:Transaction">
 			<Transaction>
@@ -1007,6 +1006,7 @@ EOF;
 
 </xsl:transform>
 EOF;
+
 if($DBG){echo 'L.' . __LINE__ . ' $convertTransactionXslString:' . $convertTransactionXslString . "\n";}
 		$requestXml = new DOMDocument();
 		$requestXml->loadXml($requestXmlString);

+ 7 - 0
SE/se-lib/TableAcl.php

@@ -77,6 +77,13 @@ class TableAcl {
 		return $this->_label;
 	}
 
+	public function getRawOpis() {
+		$opis = $this->_opis;
+		if (!$opis) return $this->getRawLabel(100);
+		$opis = strip_tags($opis);
+		return $opis;
+	}
+
 	public function getRawLabel($posLimit = 20) {
 		$label = $this->_label;
 		if (empty($label) && !empty($this->_opis)) {