[Mapbender-commits] r8737 - in trunk/mapbender: http/classes http/php http/plugins resources/locale/de_DE/LC_MESSAGES
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Nov 11 12:26:31 PST 2013
Author: armin11
Date: 2013-11-11 12:26:30 -0800 (Mon, 11 Nov 2013)
New Revision: 8737
Modified:
trunk/mapbender/http/classes/class_iso19139.php
trunk/mapbender/http/php/mod_getServiceDisclaimer.php
trunk/mapbender/http/plugins/mb_metadata_server.php
trunk/mapbender/http/plugins/mb_metadata_wfs_server.php
trunk/mapbender/resources/locale/de_DE/LC_MESSAGES/Mapbender.po
Log:
Some small bugfixes, translations for disclaimer and export service constraints to iso metadata
Modified: trunk/mapbender/http/classes/class_iso19139.php
===================================================================
--- trunk/mapbender/http/classes/class_iso19139.php 2013-11-08 13:57:08 UTC (rev 8736)
+++ trunk/mapbender/http/classes/class_iso19139.php 2013-11-11 20:26:30 UTC (rev 8737)
@@ -217,6 +217,7 @@
}
//check if keyword is a key in mapbenders custom keywords and add it to mapbenders custom categories
if (is_int($customCatHash[trim($keyword)])) {
+ //$e = new mb_exception("class_iso19139.php: found entry ".$customCatHash[trim($keyword)]." for custom keyword: ".trim($keyword));
$this->customCategories[] = $customCatHash[trim($keyword)];
}
unset($thesaurusName);
@@ -227,24 +228,24 @@
//create mapbenders internal category objects
//first for topic categories
foreach ($this->isoCategoryKeys as $isoKey) {
- $e = new mb_notice("class_iso19139.php: look for iso key: ".$isoKey);
+ //$e = new mb_exception("class_iso19139.php: look for iso key: ".$isoKey);
//test if key is found in hash
- $e = new mb_notice("class_iso19139.php: found: ".$topicCatHash[trim($isoKey)]);
+ //$e = new mb_exception("class_iso19139.php: found: ".$topicCatHash[trim($isoKey)]);
if (is_int($topicCatHash[trim($isoKey)])) {
- $e = new mb_notice("class_iso19139.php: isoCategories entry added: ".$topicCatHash[trim($isoKey)]);
+ //$e = new mb_exception("class_iso19139.php: isoCategories entry added: ".$topicCatHash[trim($isoKey)]);
$this->isoCategories[] = $topicCatHash[trim($isoKey)];
}
}
//debug output:
- foreach ($this->isoCategories as $category) {
- $e = new mb_notice("class_iso19139.php: isocat: ".$category);
+ /*foreach ($this->isoCategories as $category) {
+ $e = new mb_exception("class_iso19139.php: isocat: ".$category);
}
foreach ($this->inspireCategories as $category) {
- $e = new mb_notice("class_iso19139.php: inspirecat: ".$category);
+ $e = new mb_exception("class_iso19139.php: inspirecat: ".$category);
}
foreach ($this->customCategories as $category) {
- $e = new mb_notice("class_iso19139.php: customcat: ".$category);
- }
+ $e = new mb_exception("class_iso19139.php: customcat: ".$category);
+ }*/
$this->downloadLinks = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource[gmd:function/gmd:CI_OnLineFunctionCode/@codeListValue="download"]/gmd:linkage/gmd:URL');
/*<gmd:extent><gmd:EX_Extent><gmd:geographicElement><gmd:EX_GeographicBoundingBox><gmd:westBoundLongitude><gco:Decimal>5</gco:Decimal></gmd:westBoundLongitude><gmd:eastBoundLongitude><gco:Decimal>10</gco:Decimal></gmd:eastBoundLongitude><gmd:southBoundLatitude><gco:Decimal>48</gco:Decimal></gmd:southBoundLatitude><gmd:northBoundLatitude><gco:Decimal>52</gco:Decimal></gmd:northBoundLatitude></gmd:EX_GeographicBoundingBox></gmd:geographicElement></gmd:EX_Extent></gmd:extent>*/
//esri
@@ -1037,6 +1038,7 @@
}
//"SRID=4326;POLYGON((-140 -80,-140 80,170 80,170 -80,-140 -80))"
$postGisBbox = "SRID=4326;POLYGON((".$bboxArray[0]." ".$bboxArray[1].",".$bboxArray[0]." ".$bboxArray[3].",".$bboxArray[2]." ".$bboxArray[3].",".$bboxArray[2]." ".$bboxArray[1].",".$bboxArray[0]." ".$bboxArray[1]."))";
+ $e = new mb_exception("class_iso19139.php: bbox: ".$postGisBbox);
return $postGisBbox;
}
@@ -1064,13 +1066,14 @@
$sqlInsert = "";
if (count($this->isoCategories) > 0) {
if (count($this->isoCategories) == 1) {
- $sqlInsert .= "(".(integer)$metadataId.",".(integer)$this->isoCategories.")";
+ $sqlInsert .= "(".(integer)$metadataId.",".(integer)$this->isoCategories[0].")";
} else {
foreach ($this->isoCategories as $isoCategory) {
$sqlInsert .= "(".(integer)$metadataId.",".(integer)$isoCategory."),";
}
}
$sqlInsert = rtrim($sqlInsert,",");
+ //$e = new mb_exception("class_Iso19139: insert topic categories: ".$sqlInsert);
$sql = "INSERT INTO mb_metadata_md_topic_category (fkey_metadata_id, fkey_md_topic_category_id) VALUES ".$sqlInsert;
$res = db_query($sql);
if (!$res) {
@@ -1080,7 +1083,7 @@
$sqlInsert = "";
if (count($this->inspireCategories) > 0) {
if (count($this->inspireCategories) == 1) {
- $sqlInsert .= "(".(integer)$metadataId.",".(integer)$this->inspireCategories.")";
+ $sqlInsert .= "(".(integer)$metadataId.",".(integer)$this->inspireCategories[0].")";
} else {
foreach ($this->inspireCategories as $inspireCategory) {
$sqlInsert .= "(".(integer)$metadataId.",".(integer)$inspireCategory."),";
@@ -1088,6 +1091,7 @@
}
$sqlInsert = rtrim($sqlInsert,",");
$sql = "INSERT INTO mb_metadata_inspire_category (fkey_metadata_id, fkey_inspire_category_id) VALUES ".$sqlInsert;
+ //$e = new mb_exception("class_Iso19139: insert inspire categories: ".$sqlInsert);
$res = db_query($sql);
if (!$res) {
$e = new mb_exception("class_Iso19139:"._mb("Cannot insert inspire categories for this metadata!"));
@@ -1096,7 +1100,7 @@
$sqlInsert = "";
if (count($this->customCategories) > 0) {
if (count($this->customCategories) == 1) {
- $sqlInsert .= "(".(integer)$metadataId.",".(integer)$this->customCategories.")";
+ $sqlInsert .= "(".(integer)$metadataId.",".(integer)$this->customCategories[0].")";
} else {
foreach ($this->customCategories as $customCategory) {
$sqlInsert .= "(".(integer)$metadataId.",".(integer)$customCategory."),";
@@ -1104,6 +1108,7 @@
}
$sqlInsert = rtrim($sqlInsert,",");
$sql = "INSERT INTO mb_metadata_custom_category (fkey_metadata_id, fkey_custom_category_id) VALUES ".$sqlInsert;
+ //$e = new mb_exception("class_Iso19139: insert custom categories: ".$sqlInsert);
$res = db_query($sql);
if (!$res) {
$e = new mb_exception("class_Iso19139:"._mb("Cannot insert custom categories for this metadata!"));
@@ -1264,7 +1269,7 @@
$sqlInsertCoupledResource = "";
if (count($this->{$objectPrefix."Categories"}) > 0) {
if (count($this->{$objectPrefix."Categories"}) == 1) {
- $sqlInsertCoupledResource .= "(".(integer)$metadataId.",".(integer)$this->{$objectPrefix."Categories"}.",".$resourceId.")";
+ $sqlInsertCoupledResource .= "(".(integer)$metadataId.",".(integer)$this->{$objectPrefix."Categories"}[0].",".$resourceId.")";
} else {
foreach ($this->{$objectPrefix."Categories"} as ${$objectPrefix."Category"}) {
$sqlInsertCoupledResource .= "(".(integer)$metadataId.",".(integer)${$objectPrefix."Category"}.",".$resourceId."),";
@@ -1273,6 +1278,7 @@
}
$sqlInsertCoupledResource = rtrim($sqlInsertCoupledResource,",");
$sqlCoupledResource = "INSERT INTO ".$tablePrefix."_{$cat}_category (fkey_metadata_id, fkey_{$cat}_category_id, fkey_".$resourceType."_id) VALUES ".$sqlInsertCoupledResource;
+ //$e = new mb_exception("class_Iso19139: sql to bequeath categories: ".$sqlCoupledResource);
$res = db_query($sqlCoupledResource);
if (!$res) {
$e = new mb_exception("class_Iso19139:"._mb("Cannot insert $cat categories to coupled resource!"));
@@ -1684,7 +1690,7 @@
$result['message'] = "Cannot get metadata record with following uuid from database: ".$uuid;
return $result;
} else {
- //insert relation
+ //insert relations
$row = db_fetch_assoc($res);
$metadataId = $row['metadata_id'];
//check if current relation already exists in case of upload
@@ -1718,7 +1724,7 @@
return $result;
} else {
$this->insertKeywordsAndCategoriesIntoDB($metadataId,$resourceType,$resourceId);
- //if this was ok, lat the resource (layer/featuretype) inherit the classification from the coupled metadata to support better catalogue search
+ //if this was ok, let the resource (layer/featuretype) inherit the classification from the coupled metadata to support better catalogue search
}
}
}
Modified: trunk/mapbender/http/php/mod_getServiceDisclaimer.php
===================================================================
--- trunk/mapbender/http/php/mod_getServiceDisclaimer.php 2013-11-08 13:57:08 UTC (rev 8736)
+++ trunk/mapbender/http/php/mod_getServiceDisclaimer.php 2013-11-11 20:26:30 UTC (rev 8737)
@@ -1,330 +1,13 @@
<?php
-//http://www.geoportal.rlp.de/mapbender/php/mod_getServiceDisclaimer.php?type=wms&id=1501
-//include relevant scripts
-//
require_once(dirname(__FILE__)."/../../core/globalSettings.php");
-require_once(dirname(__FILE__)."/../classes/class_json.php");
-require_once(dirname(__FILE__) . "/../classes/class_user.php");
-//require_once(dirname(__FILE__)."/../classes/class_administration.php"); //TODO: include some class which can do the db connects
-
-//function to parse urls as links
-function display_text($string) {
- $string = eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\" target=_blank>\\0</a>", $string);
- $string = eregi_replace("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$", "<a href=\"mailto:\\0\" target=_blank>\\0</a>", $string);
- $string = eregi_replace("\n", "<br>", $string);
- return $string;
-}
-
-//initialize request parameters:
-$type = "wms";
-$id = 1;
-$languageCode = "de";
-$withHeader = false;
-$asTable = false;
-//parse request parameters
-//
-if (isset($_REQUEST["id"]) & $_REQUEST["id"] != "") {
- //validate to integer
- $testMatch = $_REQUEST["id"];
- $pattern = '/^[\d]*$/';
- if (!preg_match($pattern,$testMatch)){
- echo 'id is not valid.<br/>';
- die();
- }
- $id = (integer)$testMatch;
- $testMatch = NULL;
-}
-//
-if (isset($_REQUEST["type"]) & $_REQUEST["type"] != "") {
- //validate to wms, wfs
- $testMatch = $_REQUEST["type"];
- if (!($testMatch == 'wms' or $testMatch == 'wfs')){
- echo 'type is not valid.<br/>';
- die();
- }
- $type = $testMatch;
- $testMatch = NULL;
-}
-//
-if (isset($_REQUEST["languageCode"]) & $_REQUEST["languageCode"] != "") {
- //validate to wms, wfs
- $testMatch = $_REQUEST["languageCode"];
- if (!($testMatch == 'de' or $testMatch == 'en' or $testMatch == 'fr')){
- echo 'languageCode is not valid.<br/>';
- die();
- }
- $languageCode = $testMatch;
- $testMatch = NULL;
-}
-//
-if (isset($_REQUEST["withHeader"]) & $_REQUEST["withHeader"] != "") {
- //validate to wms, wfs
- $testMatch = $_REQUEST["withHeader"];
- if (!($testMatch == 'true' or $testMatch == 'false')){
- echo 'withHeader is not valid.<br/>';
- die();
- }
- if ($testMatch == 'true'){
- $withHeader = true;
- } else {
- $withHeader = false;
- }
- $testMatch = NULL;
-}
-//
-if (isset($_REQUEST["asTable"]) & $_REQUEST["asTable"] != "") {
- //validate to wms, wfs
- $testMatch = $_REQUEST["asTable"];
- if (!($testMatch == 'true' or $testMatch == 'false')){
- echo 'asTable is not valid.<br/>';
- die();
- }
- if ($testMatch == 'true'){
- $asTable = true;
- } else {
- $asTable = false;
- }
- $testMatch = NULL;
-}
-
-
-$htmlHeader = array();
-
-switch($languageCode){
- case 'de':
- $htmlHeader['discHeader'] = 'Nutzungsbedingungen';
- $htmlHeader['discPrivacyHeader'] = 'Datenschutzhinweis';
- $htmlHeader['accessConstraintsHeader'] = 'Beschränkungen des öffentlichen Zugangs';
- $htmlHeader['feesHeader'] = 'Angaben zu Kosten/Gebühren/Lizenzen';
- $htmlHeader['licences'] = '<b>Lizenz:</b><br>';
- $htmlHeader['networkAccess'] = 'Der Dienst ist <b>nicht im Internet</b> sondern nur in ausgewählten Netzwerken (z.B. Intranets) verfügbar. Genauere Angaben erhalten Sie ggf. im folgenden Abschnitt.<br>';
- $htmlHeader['logInformation'] = 'Die Zugriffe auf den Dienst werden vom Anbieter <b>nutzerbezogen</b> aufgezeichnet. Dies erfolgt entweder zur Abrechnung vertraglicher Vereinbarungen ';
- $htmlHeader['logInformation'] .= 'oder aufgrund gesetzlicher Vorgaben.<br><b>Wenn Sie hiermit nicht einverstanden sein sollten, nutzen Sie diesen Dienst nicht!</b><br>';
- $htmlHeader['logInformation'] .= 'Falls Sie weitere Fragen haben, kontaktieren Sie bitte den Anbieter unter ';
- $htmlHeader['priceInformation'][0] = 'Der Anbieter dieses Dienstes hat ein allgemeines Nutzungsentgelt von <b>';
- $htmlHeader['priceInformation'][1] = ' Cent pro Megapixel</b> ';
- $htmlHeader['priceInformation'][2] = ' für abgerufene Bildinformationen angegeben. Das Abrufen eines Kartenbildes in einer Standardauflösung von 600x400 Pixeln kostet dementsprechend <b>';
- $htmlHeader['priceInformation'][3] = ' Euro</b>. Angaben zu eventuell möglichen Rabatten erhalten Sie über ';
- $htmlHeader['noInformation'] = 'Es sind keine Informationen über Nutzungsbedingungen verfügbar!';
-
-
- break;
- case 'en':
- $htmlHeader['discHeader'] = 'Terms of use';
- $htmlHeader['discPrivacyHeader'] = 'Note on protection of privacy';
- $htmlHeader['accessConstraintsHeader'] = 'Constraints on public access';
- $htmlHeader['feesHeader'] = 'Information about costs/fees/licences';
- $htmlHeader['licences'] = '<b>Licence:</b><br>';
- $htmlHeader['networkAccess'] = 'This Service is <b>not available via www</b> but only in special networks. Possibly you get further information about the network availability in the following paragraph.<br>';
- $htmlHeader['logInformation'] = 'The access on this service is logged <b>user-related</b> by the provider. The logging is done to support automated settlement based on a contract ';
- $htmlHeader['logInformation'] .= 'or to fulfill legal standards.<br><b>If you do not agree on this - please don\'t use this service!</b><br>';
- $htmlHeader['logInformation'] .= 'If you have further questions, please contact the provider under ';
- $htmlHeader['priceInformation'][0] = 'The provider have defined a charge of <b>';
- $htmlHeader['priceInformation'][1] = ' (euro)cent per megapixel</b> ';
- $htmlHeader['priceInformation'][2] = ' for retrieved picture data. The retrieving of a typical map with a standardized resolution of 600x400 px will cost <b>';
- $htmlHeader['priceInformation'][3] = ' euro</b>. For information about possible discounts please contact ';
- $htmlHeader['noInformation'] = 'No informations about terms of use are available!';
-
-
-
- break;
- case 'fr':
- $htmlHeader['discHeader'] = 'Nutzungsbedingungen';
- $htmlHeader['discPrivacyHeader'] = 'Datenschutzhinweis';
- $htmlHeader['accessConstraintsHeader'] = 'Beschränkungen des öffentlichen Zugangs';
- $htmlHeader['feesHeader'] = 'Angaben zu Kosten/Gebühren/Lizenzen';
- $htmlHeader['licences'] = '<b>Lizenz:</b><br>';
- $htmlHeader['networkAccess'] = 'Der Dienst ist <b>nicht im Internet</b> sondern nur in ausgewählten Netzwerken (z.B. Intranets) verfügbar. Genauere Angaben erhalten Sie ggf. im folgenden Abschnitt.<br>';
- $htmlHeader['logInformation'] = 'Die Zugriffe auf den Dienst werden vom Anbieter <b>nutzerbezogen</b> aufgezeichnet. Dies erfolgt entweder zur Abrechnung vertraglicher Vereinbarungen ';
- $htmlHeader['logInformation'] .= 'oder aufgrund gesetzlicher Vorgaben.<br><b>Wenn Sie hiermit nicht einverstanden sein sollten, nutzen Sie diesen Dienst nicht!</b><br>';
- $htmlHeader['logInformation'] .= 'Falls Sie weitere Fragen haben, kontaktieren Sie bitte den Anbieter unter ';
- $htmlHeader['priceInformation'][0] = 'Der Anbieter dieses Dienstes hat ein allgemeines Nutzungsentgelt von <b>';
- $htmlHeader['priceInformation'][1] = ' Cent pro Megapixel</b> ';
- $htmlHeader['priceInformation'][2] = ' für abgerufene Bildinformationen angegeben. Das Abrufen eines Kartenbildes in einer Standardauflösung von 600x400 Pixeln kostet dementsprechend <b>';
- $htmlHeader['priceInformation'][3] = ' Euro</b>. Angaben zu eventuell möglichen Rabatten erhalten Sie über ';
- $htmlHeader['noInformation'] = 'No informations about terms of use are available!';
-
-
- break;
- default:
- $htmlHeader['discHeader'] = 'Nutzungsbedingungen';
- $htmlHeader['discPrivacyHeader'] = 'Datenschutzhinweis';
- $htmlHeader['accessConstraintsHeader'] = 'Beschränkungen des öffentlichen Zugangs';
- $htmlHeader['feesHeader'] = 'Angaben zu Kosten/Gebühren/Lizenzen';
- $htmlHeader['licences'] = '<b>Lizenz:</b><br>';
- $htmlHeader['networkAccess'] = 'Der Dienst ist <b>nicht im Internet</b> sondern nur in ausgewählten Netzwerken (z.B. Intranets) verfügbar. Genauere Angaben erhalten Sie ggf. im folgenden Abschnitt.<br>';
- $htmlHeader['logInformation'] = 'Die Zugriffe auf den Dienst werden vom Anbieter <b>nutzerbezogen</b> aufgezeichnet. Dies erfolgt entweder zur Abrechnung vertraglicher Vereinbarungen ';
- $htmlHeader['logInformation'] .= 'oder aufgrund gesetzlicher Vorgaben.<br><b>Wenn Sie hiermit nicht einverstanden sein sollten, nutzen Sie diesen Dienst nicht!</b><br>';
- $htmlHeader['logInformation'] .= 'Falls Sie weitere Fragen haben, kontaktieren Sie bitte den Anbieter unter ';
- $htmlHeader['priceInformation'][0] = 'Der Anbieter dieses Dienstes hat ein allgemeines Nutzungsentgelt von <b>';
- $htmlHeader['priceInformation'][1] = ' Cent pro Megapixel</b> ';
- $htmlHeader['priceInformation'][2] = ' für abgerufene Bildinformationen angegeben. Das Abrufen eines Kartenbildes in einer Standardauflösung von 600x400 Pixeln kostet dementsprechend <b>';
- $htmlHeader['priceInformation'][3] = ' Euro</b>. Angaben zu eventuell möglichen Rabatten erhalten Sie über ';
- $htmlHeader['noInformation'] = 'No informations about terms of use are available!';
-
- }
-
-//parameters: type :wms, wfs, ... string
-// id :1234, 234, ... integer
-//
-//
-//read information from database
-//
-//
-if ($type == "wms") {
- $sql = "SELECT wms_id, wms.accessconstraints, wms.fees, wms.wms_network_access , wms.wms_pricevolume, wms.wms_proxylog, termsofuse.name,";
- $sql .= " termsofuse.termsofuse_id, termsofuse.symbollink, termsofuse.description,termsofuse.descriptionlink, termsofuse.isopen from wms LEFT OUTER JOIN";
- $sql .= " wms_termsofuse ON (wms.wms_id = wms_termsofuse.fkey_wms_id) LEFT OUTER JOIN termsofuse ON";
- $sql .= " (wms_termsofuse.fkey_termsofuse_id=termsofuse.termsofuse_id) where wms.wms_id = $1";
-}
-if ($type == "wfs") {
- $sql = "SELECT wfs_id, accessconstraints, fees, wfs_network_access , termsofuse.name,";
- $sql .= " termsofuse.termsofuse_id ,termsofuse.symbollink, termsofuse.description,termsofuse.descriptionlink, termsofuse.isopen from wfs LEFT OUTER JOIN";
- $sql .= " wfs_termsofuse ON (wfs.wfs_id = wfs_termsofuse.fkey_wfs_id) LEFT OUTER JOIN termsofuse ON";
- $sql .= " (wfs_termsofuse.fkey_termsofuse_id=termsofuse.termsofuse_id) where wfs.wfs_id = $1";
-}
-$v = array();
-$t = array();
-array_push($t, "i");
-array_push($v, $id);
-$res = db_prep_query($sql,$v,$t);
-$row = db_fetch_array($res);
-if (!isset($row['wms_id'])) {
-echo $type."-service with this id is not known!";
+require_once(dirname(__FILE__)."/../classes/class_owsConstraints.php");
+$constraints = new OwsConstraints();
+$result = $constraints->getRequestParameters();
+//$constraints->returnDirect = false;
+$constraints->returnDirect = true;
+if (!$result['success']) {
+ echo $result['message'];
die();
}
-//get email adress of responsible person for service:
-if ($type == "wms") {
- $sql = "SELECT mb_user_email FROM wms LEFT OUTER JOIN mb_user ON (wms_owner = mb_user.mb_user_id) WHERE wms_id=$1";
-}
-if ($type == "wfs") {
- $sql = "SELECT mb_user_email FROM wfs LEFT OUTER JOIN mb_user ON (wfs_owner = mb_user.mb_user_id) WHERE wfs_id=$1";
-}
-$v = array();
-$t = array();
-
-array_push($t, "i");
-array_push($v, $id);
-
-$res = db_prep_query($sql,$v,$t);
-
-$rowOwner = db_fetch_array($res);
-
-
-
-
-if ((isset($row[$type.'_proxylog']) & $row[$type.'_proxylog'] != 0) or strtoupper($row['accessconstraints']) != "NONE" or strtoupper($row['fees']) != "NONE" or isset($row['termsofuse_id']) or (isset($row[$type.'_network_access']) & $row[$type.'_network_access'] != 0)) {
- //generate text for json object if restrictions exists
- if ($withHeader) {
- echo "<h1>".$htmlHeader['discHeader']."</h1>";
- }
- if ($asTable) {
- $tableBegin = "<table>\n";
- $t_a = "\t<tr>\n\t\t<th>\n\t\t\t";
- $t_b = "\n\t\t</th>\n\t\t<td>\n\t\t\t";
- $t_c = "\n\t\t</td>\n\t</tr>\n";
- $tableEnd = "</table>\n";
- echo $tableBegin;
- if (isset($row[$type.'_proxylog']) & $row[$type.'_proxylog'] != 0 ) {
- $discPrivacy = $htmlHeader['logInformation'];
- $discPrivacy .= "<a href=\"mailto:".$rowOwner['mb_user_email']."\">".$rowOwner['mb_user_email']."</a>";
- echo $t_a.$htmlHeader['discPrivacyHeader'].$t_b.$discPrivacy.$t_c;
- }
- if ((strtoupper($row['accessconstraints']) != "NONE" & (str_replace(" ", "", $row['accessconstraints']) != "")) or (isset($row[$type.'_network_access']) & $row[$type.'_network_access'] != 0) ) {
- $accessConstraintsHeader = $htmlHeader['accessConstraintsHeader'];
- if (isset($row[$type.'_network_access']) & $row[$type.'_network_access'] != 0) {
- $accessConstraints = $htmlHeader['networkAccess'];
- }
- else {
- $accessConstraints = "";
- }
- $accessConstraints .= display_text($row['accessconstraints']);
- echo $t_a.$htmlHeader['accessConstraintsHeader'].$t_b.$accessConstraints.$t_c;
- }
- if (isset($row['termsofuse_id']) or (strtoupper($row['fees']) != "NONE" & (str_replace(" ", "", $row['fees']) != "")) or ($type == "wms" & isset($row['wms_pricevolume']) & $row['wms_pricevolume'] != 0) ) {
- $feesPart = $t_a.$htmlHeader['feesHeader'].$t_b;
- if (isset($row['termsofuse_id'])) {
- $fees = $htmlHeader['licences'];
- #$fees .= $row['name']."<br>";
- $fees .= "<a href='".$row['descriptionlink']."' target=_blank><img style='border: none;' src='".$row['symbollink']."' ".$row['name']."></a><br>";
- if (isset($row['isopen']) && $row['isopen'] == "1") {
- //show opendata symbol
- $fees .= "<br><img src='../img/od_80x15_blue.png' /><br>";
- }
- $fees .= $row['description']."<br>";
- $feesPart .= $fees;
- } else {
- if (isset($row['fees']) & ((strtoupper($row['fees']) != 'NONE') or ($row['fees'] != ''))) {
- $fees = display_text($row['fees']);
- $feesPart .= $fees;
- }
- }
- if ($type == "wms" & isset($row['wms_pricevolume']) & $row['wms_pricevolume'] != 0) {
- $priceExample = (integer)$row['wms_pricevolume']*400*600/100000000;
- $priceInformation = $htmlHeader['priceInformation'][0].(integer)$row['wms_pricevolume'];
- $priceInformation .= $htmlHeader['priceInformation'][1].$htmlHeader['priceInformation'][2].$priceExample.$htmlHeader['priceInformation'][3]." <a href=\"mailto:".$rowOwner['mb_user_email']."\">".$rowOwner['mb_user_email']."</a><br>";
- $feesPart .= "<br>".$priceInformation.$t_c;
- } else {
- $feesPart .= $t_c;
- }
- }
- echo $feesPart.$tableEnd;
- } else {
- //information is given in the standard way - not as a html table
- if (isset($row[$type.'_proxylog']) & $row[$type.'_proxylog'] != 0 ) {
- $discPrivacy = $htmlHeader['logInformation'];
- $discPrivacy .= "<a href=\"mailto:".$rowOwner['mb_user_email']."\">".$rowOwner['mb_user_email']."</a>";
- echo "<h2>".$htmlHeader['discPrivacyHeader']."</h2>";
- echo $discPrivacy."<br>";
- }
- if ((strtoupper($row['accessconstraints']) != "NONE" & (str_replace(" ", "", $row['accessconstraints']) != "")) or (isset($row[$type.'_network_access']) & $row[$type.'_network_access'] != 0) ) {
- $accessConstraintsHeader = $htmlHeader['accessConstraintsHeader'];
- if (isset($row[$type.'_network_access']) & $row[$type.'_network_access'] != 0) {
- $accessConstraints = $htmlHeader['networkAccess'];
- }
- else {
- $accessConstraints = "";
- }
- $accessConstraints .= display_text($row['accessconstraints']);
- echo "<h2>".$htmlHeader['accessConstraintsHeader']."</h2>";
- echo $accessConstraints."<br>";
- }
- if (isset($row['termsofuse_id']) or (strtoupper($row['fees']) != "NONE" & (str_replace(" ", "", $row['fees']) != "")) or ($type == "wms" & isset($row['wms_pricevolume']) & $row['wms_pricevolume'] != 0) ) {
- echo "<h2>".$htmlHeader['feesHeader']."</h2>";
- if (isset($row['termsofuse_id'])) {
- $fees = $htmlHeader['licences'];
- #$fees .= $row['name']."<br>";
- $fees .= "<a href='".$row['descriptionlink']."' target=_blank><img src='".$row['symbollink']."' ".$row['name']."></a><br>";
- if (isset($row['isopen']) && $row['isopen'] == "1") {
- //show opendata symbol
- $fees .= "<br><img src='../img/od_80x15_blue.png' /><br>";
- }
- $fees .= $row['description']."<br>";
- echo $fees."<br>";
- } else {
- if (isset($row['fees']) & ((strtoupper($row['fees']) != 'NONE') or ($row['fees'] != ''))) {
- $fees = display_text($row['fees']);
- echo $fees."<br>";
- }
- }
- if ($type == "wms" & isset($row['wms_pricevolume']) & $row['wms_pricevolume'] != 0) {
- $priceExample = (integer)$row['wms_pricevolume']*400*600/100000000;
- $priceInformation = $htmlHeader['priceInformation'][0].(integer)$row['wms_pricevolume'];
- $priceInformation .= $htmlHeader['priceInformation'][1].$htmlHeader['priceInformation'][2].$priceExample.$htmlHeader['priceInformation'][3]." <a href=\"mailto:".$rowOwner['mb_user_email']."\">".$rowOwner['mb_user_email']."</a><br>";
- echo $priceInformation."<br>";
- }
- }
- }
-} else {
- /*//if nothing about restrictions is defined
- if ($asTable){
- echo $tableBegin;
- echo $t_a.$htmlHeader['noInformation'].$t_b.$t_c."<br>";
- echo $tableEnd;
- } else {
- echo $htmlHeader['noInformation']."<br>" ;
- }*/
- echo "free";//since it is not neccessary to give information about nothing ;-)
-}
-
+$result = $constraints->getDisclaimer();
?>
Modified: trunk/mapbender/http/plugins/mb_metadata_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_server.php 2013-11-08 13:57:08 UTC (rev 8736)
+++ trunk/mapbender/http/plugins/mb_metadata_server.php 2013-11-11 20:26:30 UTC (rev 8737)
@@ -194,9 +194,10 @@
else {
$resultObj["wms_termsofuse"] = null;
}
-
$resultObj['wms_network_access'] = $resultObj['wms_network_access'] == 1 ? true : false;
-
+ if (is_null($resultObj['inspire_annual_requests']) || $resultObj['inspire_annual_requests'] == "") {
+ $resultObj['inspire_annual_requests'] = "0";
+ }
//get contact information from group relation
//check if fkey_mb_group_id has been defined before - in service table
if ($resultObj["fkey_mb_group_id"] == "" || !isset($resultObj["fkey_mb_group_id"])){
@@ -478,7 +479,11 @@
if ($c == 'wms_termsofuse' && $data->wms->$c == "0") {
$value = null;
} else {
- $value = $data->wms->$c;
+ if ($c == 'inspire_annual_requests' && $data->wms->$c == "") {
+ $value = "0";
+ } else {
+ $value = $data->wms->$c;
+ }
}
if (!is_null($value)) {
$wms->$c = $value;
@@ -807,8 +812,16 @@
$mbMetadata->inspireCharset = $data->inspire_charset;
$mbMetadata->updateFrequency = $data->update_frequency;
$mbMetadata->downloadLinks = array($data->downloadlink);
- $mbMetadata->inspireWholeArea = $data->inspire_whole_area;
- $mbMetadata->inspireActualCoverage = $data->inspire_actual_coverage;
+ if (isset($data->inspire_whole_area) && $data->inspire_whole_area != "") {
+ $mbMetadata->inspireWholeArea = $data->inspire_whole_area;
+ } else {
+ $mbMetadata->inspireWholeArea = 0;
+ }
+ if (isset($data->inspire_actual_coverage) && $data->inspire_actual_coverage != "") {
+ $mbMetadata->inspireActualCoverage = $data->inspire_actual_coverage;
+ } else {
+ $mbMetadata->inspireActualCoverage = 0;
+ }
//categories ...
//new for keywords and classifications:
if (isset($data->keywords) && $data->keywords != "") {
@@ -1016,12 +1029,16 @@
$mbMetadata->wgs84Bbox[1] = $data->south;
}
$e = new mb_exception("whole area: ".$data->inspire_whole_area);
- if (isset($data->inspire_whole_area)) {
+ if (isset($data->inspire_whole_area) && $data->inspire_whole_area != "") {
$mbMetadata->inspireWholeArea = $data->inspire_whole_area;
+ } else {
+ $mbMetadata->inspireWholeArea = 0;
}
- if (isset($data->inspire_actual_coverage)) {
+ if (isset($data->inspire_actual_coverage) && $data->inspire_actual_coverage != "") {
$mbMetadata->inspireActualCoverage = $data->inspire_actual_coverage;
- }
+ } else {
+ $mbMetadata->inspireActualCoverage = 0;
+ }
//Check if origin is external and export2csw is activated!
if ($origin == 'external' ) {
//harvest link from location, parse the content for datasetid and push xml into data column
Modified: trunk/mapbender/http/plugins/mb_metadata_wfs_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_wfs_server.php 2013-11-08 13:57:08 UTC (rev 8736)
+++ trunk/mapbender/http/plugins/mb_metadata_wfs_server.php 2013-11-11 20:26:30 UTC (rev 8737)
@@ -125,6 +125,9 @@
$resultObj["wfs_termsofuse"] = null;
}
$resultObj['wfs_network_access'] = $resultObj['wfs_network_access'] == 1 ? true : false;
+ if (is_null($resultObj['inspire_annual_requests']) || $resultObj['inspire_annual_requests'] == "") {
+ $resultObj['inspire_annual_requests'] = "0";
+ }
//get contact information from group relation
//check if fkey_mb_group_id has been defined before - in service table
if ($resultObj["fkey_mb_group_id"] == "" || !isset($resultObj["fkey_mb_group_id"])){
Modified: trunk/mapbender/resources/locale/de_DE/LC_MESSAGES/Mapbender.po
===================================================================
--- trunk/mapbender/resources/locale/de_DE/LC_MESSAGES/Mapbender.po 2013-11-08 13:57:08 UTC (rev 8736)
+++ trunk/mapbender/resources/locale/de_DE/LC_MESSAGES/Mapbender.po 2013-11-11 20:26:30 UTC (rev 8737)
@@ -3608,3 +3608,41 @@
msgid "When notifying the owners of this WMS about your changes, an error occured"
msgstr "Bei der Benachrichtigung der Nutzer und Abonnenten über die Änderungen am WMS trat ein Fehler auf"
+msgid "Note on protection of privacy"
+msgstr "Datenschutzhinweis"
+
+msgid "Constraints on public access"
+msgstr "Beschränkungen des öffentlichen Zugangs"
+
+msgid "Information about costs/fees/licences"
+msgstr "Angaben zu Kosten/Gebühren/Lizenzen"
+
+msgid "Licence"
+msgstr "Lizenz"
+
+msgid "This Service is <b>not available via www</b> but only in special networks. Possibly you get further information about the network availability in the following paragraph.<br>"
+msgstr "Der Dienst ist <b>nicht im Internet</b> sondern nur in ausgewählten Netzwerken (z.B. Intranets) verfügbar. Genauere Angaben erhalten Sie ggf. im folgenden Abschnitt.<br>"
+
+msgid "The access on this service is logged <b>user-related</b> by the provider. The logging is done to support automated settlement based on a contract "
+msgstr "Die Zugriffe auf den Dienst werden vom Anbieter <b>nutzerbezogen</b> aufgezeichnet. Dies erfolgt entweder zur Abrechnung vertraglicher Vereinbarungen "
+
+msgid "or to fulfill legal standards.<br><b>If you do not agree on this - please don't use this service!</b><br>"
+msgstr "oder aufgrund gesetzlicher Vorgaben.<br><b>Wenn Sie hiermit nicht einverstanden sein sollten, nutzen Sie diesen Dienst nicht!</b><br>"
+
+msgid "If you have further questions, please contact the provider under "
+msgstr "Falls Sie weitere Fragen haben, kontaktieren Sie bitte den Anbieter unter "
+
+msgid "The provider have defined a charge of <b>"
+msgstr "Der Anbieter dieses Dienstes hat ein allgemeines Nutzungsentgelt von <b>"
+
+msgid " (euro)cent per megapixel</b> "
+msgstr " Cent pro Megapixel</b> "
+
+msgid " for retrieved picture data. The retrieving of a typical map with a standardized resolution of 600x400 px will cost <b>"
+msgstr " für abgerufene Bildinformationen angegeben. Das Abrufen eines Kartenbildes in einer Standardauflösung von 600x400 Pixeln kostet dementsprechend <b>"
+
+msgid " euro</b>. For information about possible discounts please contact "
+msgstr " Euro</b>. Angaben zu eventuell möglichen Rabatten erhalten Sie über "
+
+
+
More information about the Mapbender_commits
mailing list