[Mapbender-commits] r7465 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Jan 21 01:26:57 EST 2011
Author: armin11
Date: 2011-01-20 22:26:57 -0800 (Thu, 20 Jan 2011)
New Revision: 7465
Modified:
trunk/mapbender/http/php/mod_callMetadata.php
Log:
Give titles for orderBy and maxResults to show them as header for the resultList auf a metadata search
Modified: trunk/mapbender/http/php/mod_callMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_callMetadata.php 2011-01-20 16:29:20 UTC (rev 7464)
+++ trunk/mapbender/http/php/mod_callMetadata.php 2011-01-21 06:26:57 UTC (rev 7465)
@@ -42,7 +42,7 @@
#$searchResources = "wms";
$searchPages = "1";
$resultTarget = "debug";
-$preDefinedMaxResults = array(5,10,15,20);
+$preDefinedMaxResults = array(5,10,15,20,25,30);
$searchEPSG = "EPSG:31466";
$classJSON = new Mapbender_JSON;
#$tempFolder = "/tmp";
@@ -716,6 +716,7 @@
//generate filter for different maxResults entries
//$preDefinedMaxResults
if ($_REQUEST["maxResults"] == '') {
+ $queryJSON->searchFilter->maxResults->header = $maxResultsTitle['header'];
$queryJSON->searchFilter->maxResults->title = $preDefinedMaxResults[0];
for ($i=0; $i<(count($preDefinedMaxResults)-1); $i++) {
$queryJSON->searchFilter->maxResults->item[$i]->title = $preDefinedMaxResults[$i+1];
@@ -723,6 +724,7 @@
}
} else {
if (in_array($maxResults, $preDefinedMaxResults)) { //is part of preDefined array
+ $queryJSON->searchFilter->maxResults->header = $maxResultsTitle['header'];
$queryJSON->searchFilter->maxResults->title = $maxResults;
//delete entry from array
//$preDefinedMaxResultsRed = deleteEntry($preDefinedMaxResults, $maxResults);
@@ -731,6 +733,7 @@
$queryJSON->searchFilter->maxResults->item[$i]->url = $searchURL."&maxResults=".$preDefinedMaxResults[$i];
}
} else { // is some other value
+ $queryJSON->searchFilter->maxResults->header = $maxResultsTitle['header'];
$queryJSON->searchFilter->maxResults->title = $maxResults;
for ($i=0; $i<(count($preDefinedMaxResults)); $i++) {
$queryJSON->searchFilter->maxResults->item[$i]->title = $preDefinedMaxResults[$i];
@@ -749,6 +752,7 @@
//$queryJSON->searchFilter = (object) array();
if ($_REQUEST["orderBy"] == '') {
//echo "<br>orderBy:>".$_REQUEST["orderBy"]."<<br>";
+ $queryJSON->searchFilter->orderFilter->header = $orderByTitle['header'];
$queryJSON->searchFilter->orderFilter->title = $orderByTitle['rank'];
$queryJSON->searchFilter->orderFilter->item[0]->title = $orderByTitle['title'];
$queryJSON->searchFilter->orderFilter->item[0]->url = $searchURL."&orderBy=title";
@@ -760,6 +764,7 @@
} else {
//read out actual order filter
+ $queryJSON->searchFilter->orderFilter->header = $orderByTitle['header'];
switch ($orderBy) {
case "rank":
$queryJSON->searchFilter->orderFilter->title = $orderByTitle['rank'];
More information about the Mapbender_commits
mailing list