[Mapbender-commits] r8269 - trunk/mapbender/http/geoportal

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Feb 29 01:16:30 EST 2012


Author: armin11
Date: 2012-02-28 22:16:30 -0800 (Tue, 28 Feb 2012)
New Revision: 8269

Modified:
   trunk/mapbender/http/geoportal/mod_readCSWResults.php
Log:
Bugfix

Modified: trunk/mapbender/http/geoportal/mod_readCSWResults.php
===================================================================
--- trunk/mapbender/http/geoportal/mod_readCSWResults.php	2012-02-27 12:51:51 UTC (rev 8268)
+++ trunk/mapbender/http/geoportal/mod_readCSWResults.php	2012-02-29 06:16:30 UTC (rev 8269)
@@ -398,38 +398,8 @@
 
 	$getRecords .= '          </ogc:And>';
 	$getRecords .= '          </ogc:Filter>';
-	$getRecords .= '          </csw:Constraint>'; 
-//insert the sortby constraint
-/*<ogc:SortBy xmlns:ogc="http://www.opengis.net/ogc">
-<ogc:SortProperty>
-<ogc:PropertyName>Denominator</ogc:PropertyName>
-<ogc:SortOrder>ASC</ogc:SortOrder>
-</ogc:SortProperty>
-</ogc:SortBy>*/
-	if (isset($ranking) && $ranking != "") {
-		switch ($ranking) {
-    			case ($ranking=='date'):
-				$getRecords .= '<ogc:SortBy>';
-				$getRecords .= '<ogc:SortProperty>';
-				$getRecords .= '<ogc:PropertyName>';
-				$getRecords .= 'dc:date';
-				$getRecords .= '</ogc:PropertyName>';
-				$getRecords .= '<ogc:SortOrder>ASC</ogc:SortOrder>';
-				$getRecords .= '</ogc:SortProperty>';
-				$getRecords .= '</ogc:SortBy>';
-			break;
-			case ($ranking=='title'):
-				$getRecords .= '<ogc:SortBy>';
-				$getRecords .= '<ogc:SortProperty>';
-				$getRecords .= '<ogc:PropertyName>';
-				$getRecords .= 'dc:title';
-				$getRecords .= '</ogc:PropertyName>';
-				$getRecords .= '<ogc:SortOrder>ASC</ogc:SortOrder>';
-				$getRecords .= '</ogc:SortProperty>';
-				$getRecords .= '</ogc:SortBy>';
-			break;
-		}
-	}         
+
+	$getRecords .= '          </csw:Constraint>';          
 	$getRecords .= '          </csw:Query>';
 	$getRecords .= '</csw:GetRecords>';
 
@@ -574,7 +544,7 @@
 			unset($uuid);
 			unset($bbox);
 			unset($graphicURL);
-			$isViewService = false;
+			unset($isViewService);
 			//$uuid = $openSearchXml->xpath('/csw:GetRecordsResponse/gmd:MD_Metadata['.$i.']/gmd:fileIdentifier/gco:CharacterString');
 			$index = $i + 1 ;
 			//Check for type of record
@@ -614,8 +584,6 @@
 				case 'application':
 					$graphicURL = $openSearchXml->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$index.']/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic/gmd:fileName/gco:CharacterString');
 					$bbox = $openSearchXml->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$index.']/gmd:identificationInfo/*/*/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/*/gco:Decimal');
-					$title = $openSearchXml->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$index.']/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString');
-					$abstract = $openSearchXml->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$index.']/gmd:identificationInfo/*/gmd:abstract/gco:CharacterString');
 					break;
     				case 'service':
 
@@ -680,8 +648,7 @@
 			}
 			
 			//check for view service type
-			//if (strtoupper($typeOfService) == 'WMS' || strtoupper($typeOfService) == 'VIEW'  || strpos(strtoupper($typeOfService,'WMS')) !== false) {
-			if (strtoupper($typeOfService) == 'WMS' || strtoupper($typeOfService) == 'VIEW' ) {
+			if (strtoupper($typeOfService) == 'WMS' || strtoupper($typeOfService) == 'VIEW'  || strpos(strtoupper($typeOfService,'WMS')) !== false) {
 				$isViewService = true;	
 				echo "view service identified<br>";
 			}



More information about the Mapbender_commits mailing list