[Mapbender-commits] r3699 - in branches/print_dev/http/print: .
classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Mar 13 05:39:46 EDT 2009
Author: mschulz
Date: 2009-03-13 05:39:43 -0400 (Fri, 13 Mar 2009)
New Revision: 3699
Modified:
branches/print_dev/http/print/classes/mbMapDecorator.php
branches/print_dev/http/print/classes/mbTextDecorator.php
branches/print_dev/http/print/mod_printPDF_div.php
Log:
fixed bug when overriding values from request
Modified: branches/print_dev/http/print/classes/mbMapDecorator.php
===================================================================
--- branches/print_dev/http/print/classes/mbMapDecorator.php 2009-03-13 07:57:51 UTC (rev 3698)
+++ branches/print_dev/http/print/classes/mbMapDecorator.php 2009-03-13 09:39:43 UTC (rev 3699)
@@ -31,7 +31,8 @@
$e = new mb_notice("mbMapDecorator: checking Request: ".$k."=".$v);
}
- foreach ($this->overrideMembersFromRequest as $overrideMemberFromRequest) {
+ foreach ($this->overrideMembersFromRequest as $overrideMemberFromRequest) {
+ $this->{$overrideMemberFromRequest} = $this->conf->{$overrideMemberFromRequest};
foreach ($idsFromRequest as $requestKey => $memberId) {
$e = new mb_notice("mbMapDecorator: before override: set ".$memberId." to ".$requestKey);
if ($overrideMemberFromRequest==$memberId && isset($_REQUEST[$requestKey]) && $_REQUEST[$requestKey] != "") {
@@ -40,6 +41,7 @@
}
else {
$this->{$overrideMemberFromRequest} = $this->conf->{$memberId};
+ $e = new mb_notice("mbMapDecorator: override from conf: ".$overrideMemberFromRequest." to ".$this->conf->{$memberId});
}
}
}
@@ -88,4 +90,4 @@
}
-?>
\ No newline at end of file
+?>
Modified: branches/print_dev/http/print/classes/mbTextDecorator.php
===================================================================
--- branches/print_dev/http/print/classes/mbTextDecorator.php 2009-03-13 07:57:51 UTC (rev 3698)
+++ branches/print_dev/http/print/classes/mbTextDecorator.php 2009-03-13 09:39:43 UTC (rev 3699)
@@ -27,6 +27,17 @@
}
foreach ($this->overrideMembersFromRequest as $overrideMemberFromRequest) {
+ switch ($this->conf->{$overrideMemberFromRequest}) {
+ case "date":
+ $this->{$overrideMemberFromRequest} = date("d.m.y");
+ break;
+ case "scale":
+ $this->{$overrideMemberFromRequest} = "1 : ".$_REQUEST["map_scale"];
+ break;
+ default:
+ $this->{$overrideMemberFromRequest} = $this->conf->{$overrideMemberFromRequest};
+ break;
+ }
foreach ($idsFromRequest as $requestKey => $memberId) {
$e = new mb_notice("mbTextDecorator: before override: set ".$memberId." to ".$requestKey);
if ($overrideMemberFromRequest==$memberId && isset($_REQUEST[$requestKey]) && $_REQUEST[$requestKey] != "") {
@@ -49,4 +60,4 @@
}
-?>
\ No newline at end of file
+?>
Modified: branches/print_dev/http/print/mod_printPDF_div.php
===================================================================
--- branches/print_dev/http/print/mod_printPDF_div.php 2009-03-13 07:57:51 UTC (rev 3698)
+++ branches/print_dev/http/print/mod_printPDF_div.php 2009-03-13 09:39:43 UTC (rev 3699)
@@ -135,6 +135,7 @@
updateFormField(formData, "overview_url", mb_mapObj[ind_overview].mapURL);
}
+ updateFormField(formData, "map_scale", mb_getScale(myTarget));
// write the measured coordinates
if (mod_measure_RX != undefined && mod_measure_RY != undefined) {
var tmp_x = '';
@@ -233,4 +234,4 @@
function stripslashes( str ) {
return (str+'').replace(/\0/g, '0').replace(/\\([\\'"])/g, '$1');
-}
\ No newline at end of file
+}
More information about the Mapbender_commits
mailing list