[Mapbender-commits] r7043 - in trunk/mapbender/http: classes php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Oct 15 08:33:40 EDT 2010
Author: armin11
Date: 2010-10-15 05:33:40 -0700 (Fri, 15 Oct 2010)
New Revision: 7043
Modified:
trunk/mapbender/http/classes/class_wmc.php
trunk/mapbender/http/php/mod_getServiceDisclaimer.php
trunk/mapbender/http/php/mod_showMetadata.php
Log:
Some adoptions to show a disclaimer for terms of use of wmc docs. The terms of use from all included services must be called. This is only be done for wms now - for wfs - terms of use - this must be done later.
Modified: trunk/mapbender/http/classes/class_wmc.php
===================================================================
--- trunk/mapbender/http/classes/class_wmc.php 2010-10-14 18:46:40 UTC (rev 7042)
+++ trunk/mapbender/http/classes/class_wmc.php 2010-10-15 12:33:40 UTC (rev 7043)
@@ -158,7 +158,7 @@
$sql = "SELECT wmc_timestamp, wmc_title, wmc_public " .
"FROM mb_user_wmc WHERE wmc_serial_id = $1 AND (fkey_user_id = $2 OR wmc_public = 1)";
$v = array($wmcId, Mapbender::session()->get("mb_user_id"));
- $t = array("s", "i");
+ $t = array("i", "i");
$res = db_prep_query($sql,$v,$t);
if(db_error()) { return false; }
Modified: trunk/mapbender/http/php/mod_getServiceDisclaimer.php
===================================================================
--- trunk/mapbender/http/php/mod_getServiceDisclaimer.php 2010-10-14 18:46:40 UTC (rev 7042)
+++ trunk/mapbender/http/php/mod_getServiceDisclaimer.php 2010-10-15 12:33:40 UTC (rev 7043)
@@ -4,6 +4,7 @@
//
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
@@ -91,7 +92,7 @@
switch($languageCode){
case 'de':
- $htmlHeader['discHeader'] = 'Nutzungsbedingungen des angefragten Service';
+ $htmlHeader['discHeader'] = 'Nutzungsbedingungen';
$htmlHeader['discPrivacyHeader'] = 'Datenschutzhinweis';
$htmlHeader['accessConstraintsHeader'] = 'Beschränkungen des öffentlichen Zugangs';
$htmlHeader['feesHeader'] = 'Angaben zu Kosten/Gebühren/Lizenzen';
@@ -128,7 +129,7 @@
break;
case 'fr':
- $htmlHeader['discHeader'] = 'Nutzungsbedingungen des angefragten Service';
+ $htmlHeader['discHeader'] = 'Nutzungsbedingungen';
$htmlHeader['discPrivacyHeader'] = 'Datenschutzhinweis';
$htmlHeader['accessConstraintsHeader'] = 'Beschränkungen des öffentlichen Zugangs';
$htmlHeader['feesHeader'] = 'Angaben zu Kosten/Gebühren/Lizenzen';
@@ -146,7 +147,7 @@
break;
default:
- $htmlHeader['discHeader'] = 'Nutzungsbedingungen des angefragten Service';
+ $htmlHeader['discHeader'] = 'Nutzungsbedingungen';
$htmlHeader['discPrivacyHeader'] = 'Datenschutzhinweis';
$htmlHeader['accessConstraintsHeader'] = 'Beschränkungen des öffentlichen Zugangs';
$htmlHeader['feesHeader'] = 'Angaben zu Kosten/Gebühren/Lizenzen';
@@ -240,7 +241,7 @@
$accessConstraints .= display_text($row['accessconstraints']);
echo $t_a.$htmlHeader['accessConstraintsHeader'].$t_b.$accessConstraints.$t_c;
}
- if (isset($row['termsofuse_id']) or ($row['fees'] & strtoupper($row['fees']) != "NONE" & ($row['fees'] != '')) or ($type == "wms" & isset($row['wms_pricevolume']) & $row['wms_pricevolume'] != 0) ) {
+ if (isset($row['termsofuse_id']) or (strtoupper($row['fees']) != "NONE" or ($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'];
Modified: trunk/mapbender/http/php/mod_showMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_showMetadata.php 2010-10-14 18:46:40 UTC (rev 7042)
+++ trunk/mapbender/http/php/mod_showMetadata.php 2010-10-15 12:33:40 UTC (rev 7043)
@@ -754,7 +754,13 @@
$html .= '<div>';
}
$html .= '<p>';
-$tou = file_get_contents("http://localhost/mapbender/php/mod_getServiceDisclaimer.php?type=".$serviceType."&id=".$serviceId."&languageCode=".$languageCode."&asTable=true");
+if ($resource == 'wms' or $resource == 'layer') {
+ $tou = file_get_contents("http://localhost/mapbender/php/mod_getServiceDisclaimer.php?type=".$serviceType."&id=".$serviceId."&languageCode=".$languageCode."&asTable=true");
+}
+if ($resource == 'wmc' ) {
+ $tou = file_get_contents("http://localhost/mapbender/php/mod_getWmcDisclaimer.php?&id=".$serviceId."&languageCode=".$languageCode);
+}
+
$html .= $tou;
$html .= '</p>';
$html .= '</div>';
More information about the Mapbender_commits
mailing list