[Mapbender-commits] r4760 - branches/print_dev/core

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Sep 28 09:04:02 EDT 2009


Author: mschulz
Date: 2009-09-28 09:04:02 -0400 (Mon, 28 Sep 2009)
New Revision: 4760

Modified:
   branches/print_dev/core/globalSettings.php
   branches/print_dev/core/i18n.php
Log:
merged from trunk

Modified: branches/print_dev/core/globalSettings.php
===================================================================
--- branches/print_dev/core/globalSettings.php	2009-09-28 13:02:59 UTC (rev 4759)
+++ branches/print_dev/core/globalSettings.php	2009-09-28 13:04:02 UTC (rev 4760)
@@ -23,6 +23,12 @@
 require_once(dirname(__FILE__)."/../lib/class_Mapbender.php");
 
 //
+// until we have decided how to implement a public user,
+// use this constant. In Geoportal.rlp.de it was used as ANONYMOUS_USER
+// 
+if (!defined('PUBLIC_USER')) define('PUBLIC_USER', "");
+
+//
 // define LC_MESSAGES if unknown (for Windows platforms)
 // 
 if (!defined('LC_MESSAGES')) define('LC_MESSAGES', LC_CTYPE);
@@ -32,9 +38,12 @@
 //
 mb_internal_encoding("UTF-8");
 
-/*
+//
+// if magic quotes is on, automatically strip slashes
+// (non-recursive due to possible security hazard)
+//
 if (get_magic_quotes_gpc()) {
-	$in = array(&$_GET, &$_POST, &$_COOKIE);
+	$in = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
 	
 	while (list($k, $v) = each($in)) {
 		foreach ($v as $key => $val) {
@@ -45,9 +54,11 @@
 			$in[]= &$in[$k][$key];
 		}
 	}
+
 	unset($in);
 }
-*/
+
+
 //
 // constants
 //

Modified: branches/print_dev/core/i18n.php
===================================================================
--- branches/print_dev/core/i18n.php	2009-09-28 13:02:59 UTC (rev 4759)
+++ branches/print_dev/core/i18n.php	2009-09-28 13:04:02 UTC (rev 4760)
@@ -17,10 +17,16 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 	function _mb ($someString) {
+	    $arg = array();
+	    for($i = 1 ; $i < func_num_args(); $i++) {
+	        $arg[] = func_get_arg($i);
+	    }
+	   
 		if (USE_I18N) {
 //			$e = new mb_notice("Translating '" . $someString . "' to language " . Mapbender::session()->get("mb_locale") . ": '" . _($someString) . "'");
-			return _($someString);
+
+		    return vsprintf(_($someString), $arg);			
 		}
-		return $someString;
+	    return vsprintf($someString, $arg);			
 	}
 ?>



More information about the Mapbender_commits mailing list