[Mapbender-commits] r7824 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed May 18 06:25:08 EDT 2011


Author: armin11
Date: 2011-05-18 03:25:08 -0700 (Wed, 18 May 2011)
New Revision: 7824

Modified:
   trunk/mapbender/http/classes/class_metadata_new.php
Log:
bugfix

Modified: trunk/mapbender/http/classes/class_metadata_new.php
===================================================================
--- trunk/mapbender/http/classes/class_metadata_new.php	2011-05-17 12:54:49 UTC (rev 7823)
+++ trunk/mapbender/http/classes/class_metadata_new.php	2011-05-18 10:25:08 UTC (rev 7824)
@@ -125,8 +125,20 @@
 		$this->resourceClassifications[1]['relation_wfs'] = 'featuretype_inspire_category';
 		$this->resourceClassifications[1]['relation_wmc'] = 'wmc_inspire_category';
 //TODO: define this in mapbender
-
-		$this->resourceClassifications[2]['title'] = "Custom"; //TODO: define the translations somewhere? - This is done in call_metadata.php before. Maybe we can get them from there? - It will be shown in the rightside categories table
+		switch($this->languageCode){
+			case "de":
+				$this->resourceClassifications[2]['title'] = "Sonstige"; //TODO: define the translations somewhere? - This is done in call_metadata.php before. Maybe we can get them from there? - It will be shown in the rightside categories table
+			break;
+			case "en":
+				$this->resourceClassifications[2]['title'] = "Custom";
+			break;
+			case "fr":
+				$this->resourceClassifications[2]['title'] = "Custom"; 
+			break;
+			default:
+				$this->resourceClassifications[2]['title'] = "Custom";
+			break;
+		}
 		$this->resourceClassifications[2]['tablename'] = 'custom_category';
 		$this->resourceClassifications[2]['requestName'] = 'customCategories';
 		$this->resourceClassifications[2]['id_wms'] = 'layer_id';
@@ -204,7 +216,7 @@
 				$this->databaseTableName = 'wfs_featuretype';
 				//$this->keywordRelation = 'wfs_featuretype_keyword';
 				$this->searchView = 'search_wfs_view';
-				$this->whereStrCatExtension = "";
+				$this->whereStrCatExtension = " AND custom_category.custom_category_hidden = 0";
 				switch ($this->orderBy) {
 					case "rank":
 						$this->orderBy = " ORDER BY wfs_id,featuretype_id,wfs_conf_id ";
@@ -231,7 +243,7 @@
 				//$this->keywordRelation = 'layer_keyword';
 				$this->searchView = 'wms_search_table';
 				//$this->searchView = 'wms_search_view';
-				$this->whereStrCatExtension = "";
+				$this->whereStrCatExtension = " AND custom_category.custom_category_hidden = 0";
 				switch ($this->orderBy) {
 					case "rank":
 						$this->orderBy = " ORDER BY load_count DESC";
@@ -1141,7 +1153,7 @@
 						$sqlCat[$i] .= $this->resourceClassifications[$i]['relation_'.$this->searchResources].".fkey_";
 						$sqlCat[$i] .= $this->resourceClassifications[$i]['tablename']."_id)";
 						//the following is needed to filter the custom cats for those which should not be seen in the classification
-						if ($this->resourceClassifications[$i]['title'] != "Custom"){
+						if ($this->resourceClassifications[$i]['title'] != $this->resourceClassifications[2]['title']){
 							$sqlCat[$i] .= " WHERE ".$whereStr." GROUP BY ";
 						} else {
 							$sqlCat[$i] .= " WHERE ".$whereStr.$this->whereStrCatExtension." GROUP BY ";



More information about the Mapbender_commits mailing list