[Mapbender-commits] r2589 - in branches/testbaudson_dev: core http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jul 7 08:58:27 EDT 2008


Author: christoph
Date: 2008-07-07 08:58:27 -0400 (Mon, 07 Jul 2008)
New Revision: 2589

Added:
   branches/testbaudson_dev/core/globalSettings.php
Modified:
   branches/testbaudson_dev/http/php/mb_validateSession.php
Log:
moved stuff to file globalSettings.php
this file can be included in classes

Added: branches/testbaudson_dev/core/globalSettings.php
===================================================================
--- branches/testbaudson_dev/core/globalSettings.php	                        (rev 0)
+++ branches/testbaudson_dev/core/globalSettings.php	2008-07-07 12:58:27 UTC (rev 2589)
@@ -0,0 +1,38 @@
+<?php
+//
+// start the session
+//
+session_start();
+
+//
+//
+// All data Mapbender handles internally are UTF-8
+mb_internal_encoding("UTF-8");
+
+//
+// constants
+//
+require_once(dirname(__FILE__)."/../core/system.php");
+
+//
+// configuration file
+//
+require_once(dirname(__FILE__)."/../conf/mapbender.conf");
+
+//
+// class for error handling
+//
+require_once(dirname(__FILE__)."/../lib/exception.php");
+
+//
+// I18n wrapper function
+//
+require_once(dirname(__FILE__) . "/../core/i18n.php");
+
+//
+// establish database connection
+//
+$con = db_connect($DBSERVER, $OWNER, $PW);
+db_select_db(DB, $con);
+
+?>

Modified: branches/testbaudson_dev/http/php/mb_validateSession.php
===================================================================
--- branches/testbaudson_dev/http/php/mb_validateSession.php	2008-07-07 12:57:17 UTC (rev 2588)
+++ branches/testbaudson_dev/http/php/mb_validateSession.php	2008-07-07 12:58:27 UTC (rev 2589)
@@ -17,18 +17,9 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-session_start();
+require_once(dirname(__FILE__)."/../../core/globalSettings.php");
 
-require_once(dirname(__FILE__)."/../php/system.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
 
-//
-// establish database connection
-//
-$con = db_connect($DBSERVER, $OWNER, $PW);
-db_select_db(DB, $con);
-
 $e = new mb_notice("mb_validateSession.php: checking file " . $_SERVER["PHP_SELF"]);
 
 //



More information about the Mapbender_commits mailing list