[Mapbender-commits] r10127 - in trunk/mapbender/http: classes img php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri May 17 01:57:42 PDT 2019
Author: armin11
Date: 2019-05-17 01:57:42 -0700 (Fri, 17 May 2019)
New Revision: 10127
Added:
trunk/mapbender/http/img/icn_ok.png
trunk/mapbender/http/img/icn_warn.png
Modified:
trunk/mapbender/http/classes/class_metadata.php
trunk/mapbender/http/php/mod_callMetadata.php
Log:
Allow protocol as parameter for mod_callMetadata.php
Modified: trunk/mapbender/http/classes/class_metadata.php
===================================================================
--- trunk/mapbender/http/classes/class_metadata.php 2019-05-17 08:21:46 UTC (rev 10126)
+++ trunk/mapbender/http/classes/class_metadata.php 2019-05-17 08:57:42 UTC (rev 10127)
@@ -2114,6 +2114,12 @@
array_push($v, $id);
$res = db_prep_query($sql,$v,$t);
$row = db_fetch_array($res);
+ /*if (defined("MAPBENDER_PATH") && MAPBENDER_PATH != '') {
+ $mapbenderUrl = MAPBENDER_PATH;
+ } else {
+ $mapbenderUrl = "http://www.geoportal.rlp.de/mapbender";
+ }*/
+//TODO: use MAPBENDER_PATH!
if ((isset($row[$type.'_proxylog']) & $row[$type.'_proxylog'] != 0) or strtoupper($row['accessconstraints']) != "NONE" or strtoupper($row['fees']) != "NONE" or isset($row['termsofuse_id']) ) {
//service has some constraints defined!
//give symbol and true
@@ -2121,7 +2127,7 @@
if (isset($row['termsofuse_id']) & $row['symbollink'] != "") {
$symbolLink = $row['symbollink'];
} else {
- $symbolLink = $this->protocol."://".$this->hostName."/portal/fileadmin/design/icn_warn.png";
+ $symbolLink = $this->protocol."://".$this->hostName."/mapbender/img/icn_warn.png";
}
$hasConstraints = true;
#$disclaimerLink = $_SERVER['HTTP_HOST']."/mapbender/php/mod_getServiceDisclaimer.php?type=".$type."&id=".$id;
@@ -2130,7 +2136,7 @@
} else {
//give symbol and false
//green symbol
- $symbolLink = $this->protocol."://".$this->hostName."/portal/fileadmin/design/icn_ok.png";
+ $symbolLink = $this->protocol."://".$this->hostName."/mapbender/img/icn_ok.png";
#$disclaimerLink = "";
$hasConstraints = false;
#$symbolMouseOver = "Frei zugänglich"; //TODO internationalize it
Added: trunk/mapbender/http/img/icn_ok.png
===================================================================
(Binary files differ)
Index: trunk/mapbender/http/img/icn_ok.png
===================================================================
--- trunk/mapbender/http/img/icn_ok.png 2019-05-17 08:21:46 UTC (rev 10126)
+++ trunk/mapbender/http/img/icn_ok.png 2019-05-17 08:57:42 UTC (rev 10127)
Property changes on: trunk/mapbender/http/img/icn_ok.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/mapbender/http/img/icn_warn.png
===================================================================
(Binary files differ)
Index: trunk/mapbender/http/img/icn_warn.png
===================================================================
--- trunk/mapbender/http/img/icn_warn.png 2019-05-17 08:21:46 UTC (rev 10126)
+++ trunk/mapbender/http/img/icn_warn.png 2019-05-17 08:57:42 UTC (rev 10127)
Property changes on: trunk/mapbender/http/img/icn_warn.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/mapbender/http/php/mod_callMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_callMetadata.php 2019-05-17 08:21:46 UTC (rev 10126)
+++ trunk/mapbender/http/php/mod_callMetadata.php 2019-05-17 08:57:42 UTC (rev 10127)
@@ -265,6 +265,26 @@
$searchTypeBbox = $testMatch; //TODO activate this
$testMatch = NULL;
}
+//possibility to force https
+if (isset($_REQUEST["protocol"]) & $_REQUEST["protocol"] != "") {
+ //validate to inside / outside - TODO implement other ones than intersects which is default
+ $testMatch = $_REQUEST["protocol"];
+ if (!($testMatch == 'http' or $testMatch == 'https')){
+ //echo 'searchTypeBbox: <b>'.$testMatch.'</b> is not valid.<br/>';
+ echo 'Parameter <b>protocol</b> is not valid (http, https).<br/>';
+ die();
+ }
+ switch ($testMatch) {
+ case "https":
+ $https = true;
+ break;
+ case "http":
+ $https = false;
+ break;
+ }
+ $searchTypeBbox = $testMatch; //TODO activate this
+ $testMatch = NULL;
+}
if (isset($_REQUEST["accessRestrictions"]) & $_REQUEST["accessRestrictions"] != "") {
//validate to ?
#TODO implement me //$accessRestrictions = $_REQUEST["accessRestrictions"];
More information about the Mapbender_commits
mailing list