[Mapbender-commits] r10062 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Feb 22 00:43:42 PST 2019


Author: armin11
Date: 2019-02-22 00:43:42 -0800 (Fri, 22 Feb 2019)
New Revision: 10062

Modified:
   trunk/mapbender/http/php/mod_catalogueMaintenance.php
   trunk/mapbender/http/php/mod_catalogueMaintenance_server.php
Log:
New options to make search for wmc faster ;-)

Modified: trunk/mapbender/http/php/mod_catalogueMaintenance.php
===================================================================
--- trunk/mapbender/http/php/mod_catalogueMaintenance.php	2019-02-22 08:43:22 UTC (rev 10061)
+++ trunk/mapbender/http/php/mod_catalogueMaintenance.php	2019-02-22 08:43:42 UTC (rev 10062)
@@ -23,8 +23,8 @@
 //validate parameter values
 if (isset($_REQUEST["resourceType"]) & $_REQUEST["resourceType"] != "") {
 	$testMatch = $_REQUEST["resourceType"];	
- 	if (!($testMatch == 'wms' or $testMatch == 'wfs' or $testMatch == 'dataset')){ 
-		echo 'Parameter <b>resourceType</b> is not valid (wms, wfs, dataset).<br/>'; 
+ 	if (!($testMatch == 'wms' or $testMatch == 'wfs' or $testMatch == 'dataset' or $testMatch == 'wmc')){ 
+		echo 'Parameter <b>resourceType</b> is not valid (wms, wfs, dataset, wmc).<br/>'; 
 		die(); 		
  	}
 	$resourceType = $testMatch;
@@ -57,7 +57,8 @@
 $allowedFunctions = array(
 	'wms' => array('reindex','monitor'),
 	'wfs' => array('reindex'),
-	'dataset' => array('reindex')
+	'dataset' => array('reindex'),
+	'wmc' => array('reindex')
 );
 
 $functionThatNeedIdList = array('monitor');
@@ -101,6 +102,9 @@
 	case "dataset":
 		$title .= _mb('Dataset(s)');
 	break;
+	case "wmc":
+		$title .= _mb('WebMapContext Document(s)');
+	break;
 }
 
 echo $title;
@@ -116,8 +120,11 @@
 			$sqlCount = "SELECT count(featuretype_id) from wfs_featuretype WHERE featuretype_searchable = 1;";
 		break;
 		case "dataset":
-			$sqlCount = "SELECT count(metadata_id) from mb_metadata;";
+			$sqlCount = "SELECT count(metadata_id) from mb_metadata WHERE searchable;";
 		break;
+		case "wmc":
+			$sqlCount = "SELECT count(wmc_serial_id) from mb_user_wmc WHERE wmc_public = 1;";
+		break;
 	}
 	$resCount = db_query($sqlCount);
 	if (!$resCount) {

Modified: trunk/mapbender/http/php/mod_catalogueMaintenance_server.php
===================================================================
--- trunk/mapbender/http/php/mod_catalogueMaintenance_server.php	2019-02-22 08:43:22 UTC (rev 10061)
+++ trunk/mapbender/http/php/mod_catalogueMaintenance_server.php	2019-02-22 08:43:42 UTC (rev 10062)
@@ -34,9 +34,9 @@
 
 if (isset($_REQUEST["resourceType"]) & $_REQUEST["resourceType"] != "") {
 	$testMatch = $_REQUEST["resourceType"];	
- 	if (!($testMatch == 'wms' or $testMatch == 'wfs' or $testMatch == 'dataset')){ 
+ 	if (!($testMatch == 'wms' or $testMatch == 'wfs' or $testMatch == 'dataset' or $testMatch == 'wmc')){ 
 		$resultObj['success'] = false;
-		$resultObj['message'] = "Parameter <b>resourceType</b> is not valid (wms, wfs, dataset).<br/>";
+		$resultObj['message'] = "Parameter <b>resourceType</b> is not valid (wms, wfs, dataset, wmc).<br/>";
 		echo json_encode($resultObj);
 		die(); 		
  	}
@@ -80,7 +80,8 @@
 $allowedFunctions = array(
 	'wms' => array('reindex','monitor'),
 	'wfs' => array('reindex'),
-	'dataset' => array('reindex')
+	'dataset' => array('reindex'),
+	'wmc' => array('reindex')
 );
 
 $functionThatNeedIdList = array('monitor');



More information about the Mapbender_commits mailing list