[Mapbender-commits] r2772 - branches/2.5/http/print

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Aug 12 05:44:52 EDT 2008


Author: christoph
Date: 2008-08-12 05:44:47 -0400 (Tue, 12 Aug 2008)
New Revision: 2772

Modified:
   branches/2.5/http/print/printPDF.conf
   branches/2.5/http/print/printPDF_b.conf
Log:
workaround for http://trac.osgeo.org/mapbender/ticket/265

Modified: branches/2.5/http/print/printPDF.conf
===================================================================
--- branches/2.5/http/print/printPDF.conf	2008-08-12 09:22:12 UTC (rev 2771)
+++ branches/2.5/http/print/printPDF.conf	2008-08-12 09:44:47 UTC (rev 2772)
@@ -1,6 +1,8 @@
 <?php
-
 include_once(dirname(__FILE__)."/../../core/globalSettings.php");
+include_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+
 # filename for temporary imagefiles
 $filename = TMPDIR."/map_".substr(md5(uniqid(rand())),0,7).".png";
 
@@ -25,8 +27,8 @@
 $label_legend = _mb('print legend');
 $legendFilename = TMPDIR."/legend_".substr(md5(uniqid(rand())),0,7).".png";
 $legendFilenameUserPolygon = TMPDIR."/legend_".substr(md5(uniqid(rand())),0,7).".png";
-$legendText = _mb("Legend");
-$legendFooter = _mb("powered by Mapbender");
+$legendText = $admin->char_decode(_mb("Legend"));
+$legendFooter = $admin->char_decode(_mb("powered by Mapbender"));
 $legendImage = "./img/mapbender_logo.png";
 $legendImage_width = 90;
 $legendImage_height = 13;
@@ -39,36 +41,30 @@
 $unlink = true;
 
 # labeling
-if(CHARSET=="UTF-8"){ 
-	$new_comment1 = utf8_decode($_REQUEST["comment1"]);
-	$new_comment2 = utf8_decode($_REQUEST["comment2"]);
-}
-else{
-	$new_comment1 = $_REQUEST["comment1"];
-	$new_comment2 = $_REQUEST["comment2"];
-}
+$new_comment1 = $admin->char_decode($_REQUEST["comment1"]);
+$new_comment2 = $admin->char_decode($_REQUEST["comment2"]);
 
-$text1 = _mb("Print preview");
+$text1 = $admin->char_decode(_mb("Print preview"));
 $text2 = "- Mapbender -";
 $text3 = "";
-$text4 = _mb("Scale 1:"). " ".$_REQUEST["map_scale"];
-$text5 = _mb("Date:") . " ".date("d.m.Y",strtotime("now"));
+$text4 = $admin->char_decode(_mb("Scale 1:")). " ".$_REQUEST["map_scale"];
+$text5 = $admin->char_decode(_mb("Date:")) . " ".date("d.m.Y",strtotime("now"));
 
-$text6 = _mb("Notes:");
+$text6 = $admin->char_decode(_mb("Notes:"));
 $text7 = "";
 $text8 = $new_comment1;
 $text9 = $new_comment2;
 $text10 = "";
 
 
-$text11 = _mb("This copy has been automatically generated and is thus not valid without signature.");
-$text12 = _mb("This copy is protected by law (Par. 3 Abs. 1 VermKatG NW). It can be duplicaedted, modified, published or be passed to third parties only in agreement with");
-$text13 = _mb("the publisher, except duplicates and modifications aimed at internal use of government agencies or private use.");
+$text11 = $admin->char_decode(_mb("This copy has been automatically generated and is thus not valid without signature."));
+$text12 = $admin->char_decode(_mb("This copy is protected by law (Par. 3 Abs. 1 VermKatG NW). It can be duplicaedted, modified, published or be passed to third parties only in agreement with"));
+$text13 = $admin->char_decode(_mb("the publisher, except duplicates and modifications aimed at internal use of government agencies or private use."));
 
-$text14 = _mb("This copy is protected,");
-$text15 = _mb("ask me!!!!");
-$text16 = _mb("or the publisher");
-$text17 = _mb("or use is internally.");
+$text14 = $admin->char_decode(_mb("This copy is protected,"));
+$text15 = $admin->char_decode(_mb("ask me!!!!"));
+$text16 = $admin->char_decode(_mb("or the publisher"));
+$text17 = $admin->char_decode(_mb("or use is internally."));
 
 /*
 * Labeling for buttons, textfields ...

Modified: branches/2.5/http/print/printPDF_b.conf
===================================================================
--- branches/2.5/http/print/printPDF_b.conf	2008-08-12 09:22:12 UTC (rev 2771)
+++ branches/2.5/http/print/printPDF_b.conf	2008-08-12 09:44:47 UTC (rev 2772)
@@ -1,6 +1,8 @@
 <?php
-
 include_once(dirname(__FILE__)."/../../core/globalSettings.php");
+include_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+
 # filename for temporary imagefiles
 $filename = TMPDIR."/map_".substr(md5(uniqid(rand())),0,7).".png";
 
@@ -25,8 +27,8 @@
 $label_legend = _mb('Print legend');
 $legendFilename = TMPDIR."/legend_".substr(md5(uniqid(rand())),0,7).".png";
 $legendFilenameUserPolygon = TMPDIR."/legend_".substr(md5(uniqid(rand())),0,7).".png";
-$legendText = _mb("Legend");
-$legendFooter = _mb("powered by Mapbender");
+$legendText = $admin->char_decode(_mb("Legend"));
+$legendFooter = $admin->char_decode(_mb("powered by Mapbender"));
 $legendImage = "./img/mapbender_logo.png";
 $legendImage_width = 90;
 $legendImage_height = 13;
@@ -39,36 +41,30 @@
 $unlink = true;
 
 # labeling
-if(CHARSET=="UTF-8"){ 
-	$new_comment1 = utf8_decode($_REQUEST["comment1"]);
-	$new_comment2 = utf8_decode($_REQUEST["comment2"]);
-}
-else{
-	$new_comment1 = $_REQUEST["comment1"];
-	$new_comment2 = $_REQUEST["comment2"];
-}
+$new_comment1 = $admin->char_decode($_REQUEST["comment1"]);
+$new_comment2 = $admin->char_decode($_REQUEST["comment2"]);
 
-$text1 = _mb("Print preview");
+$text1 = $admin->char_decode(_mb("Print preview"));
 $text2 = "- Mapbender -";
 $text3 = "";
-$text4 = _mb("Scale 1:"). " ".$_REQUEST["map_scale"];
-$text5 = _mb("Date:") . " ".date("d.m.Y",strtotime("now"));
+$text4 = $admin->char_decode(_mb("Scale 1:")). " ".$_REQUEST["map_scale"];
+$text5 = $admin->char_decode(_mb("Date:")) . " ".date("d.m.Y",strtotime("now"));
 
-$text6 = _mb("Notes:");
+$text6 = $admin->char_decode(_mb("Notes:"));
 $text7 = "";
 $text8 = $new_comment1;
 $text9 = $new_comment2;
 $text10 = "";
 
 
-$text11 = _mb("This copy has been automatically generated and is thus not valid without signature.");
-$text12 = _mb("This copy is protected by law (Par. 3 Abs. 1 VermKatG NW). It can be duplicaedted, modified, published or be passed to third parties only in agreement with");
-$text13 = _mb("the publisher, except duplicates and modifications aimed at internal use of government agencies or private use.");
+$text11 = $admin->char_decode(_mb("This copy has been automatically generated and is thus not valid without signature."));
+$text12 = $admin->char_decode(_mb("This copy is protected by law (Par. 3 Abs. 1 VermKatG NW). It can be duplicaedted, modified, published or be passed to third parties only in agreement with"));
+$text13 = $admin->char_decode(_mb("the publisher, except duplicates and modifications aimed at internal use of government agencies or private use."));
 
-$text14 = _mb("This copy is protected,");
-$text15 = _mb("ask me!!!!");
-$text16 = _mb("or the publisher");
-$text17 = _mb("or use is internally.");
+$text14 = $admin->char_decode(_mb("This copy is protected,"));
+$text15 = $admin->char_decode(_mb("ask me!!!!"));
+$text16 = $admin->char_decode(_mb("or the publisher"));
+$text17 = $admin->char_decode(_mb("or use is internally."));
 
 /*
 * Labeling for buttons, textfields ...



More information about the Mapbender_commits mailing list