svn commit: r867 - trunk/mapbender/http/php
christoph at osgeo.org
christoph at osgeo.org
Mon Nov 20 09:28:22 EST 2006
Author: christoph
Date: 2006-11-20 14:28:22+0000
New Revision: 867
Modified:
trunk/mapbender/http/php/database-mysql.php
trunk/mapbender/http/php/database-pgsql.php
trunk/mapbender/http/php/mb_validatePermission.php
trunk/mapbender/http/php/mb_validateSession.php
Log:
include via dirname(__FILE__)
Modified: trunk/mapbender/http/php/database-mysql.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/database-mysql.php?view=diff&rev=867&p1=trunk/mapbender/http/php/database-mysql.php&p2=trunk/mapbender/http/php/database-mysql.php&r1=866&r2=867
==============================================================================
--- trunk/mapbender/http/php/database-mysql.php (original)
+++ trunk/mapbender/http/php/database-mysql.php 2006-11-20 14:28:22+0000
@@ -25,7 +25,7 @@
*
* example:
* \code
- * include_once("afwphp/database-mysql.php");
+ * include_once(dirname(__FILE__)."/afwphp/database-mysql.php");
* $sys_dbhost=...
* $sys_dbuser=...
* $sys_dbpasswd=...
@@ -53,8 +53,8 @@
* Notice the global vars $sys_dbhost,$sys_dbuser,$sys_dbpasswd,$sys_dbname that must be set up
* in other functions in this library
*/
-include_once("../../http/classes/class_mb_exception.php");
-include_once("../../http/classes/class_checkInput.php");
+include_once(dirname(__FILE__)."/../../http/classes/class_mb_exception.php");
+include_once(dirname(__FILE__)."/../../http/classes/class_checkInput.php");
function db_escapestring($unescaped_string){
return @mysql_escape_string($unescaped_string);
}
Modified: trunk/mapbender/http/php/database-pgsql.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/database-pgsql.php?view=diff&rev=867&p1=trunk/mapbender/http/php/database-pgsql.php&p2=trunk/mapbender/http/php/database-pgsql.php&r1=866&r2=867
==============================================================================
--- trunk/mapbender/http/php/database-pgsql.php (original)
+++ trunk/mapbender/http/php/database-pgsql.php 2006-11-20 14:28:22+0000
@@ -25,7 +25,7 @@
*
* example:
* \code
- * include_once("afwphp/database-mysql.php");
+ * include_once(dirname(__FILE__)."/afwphp/database-mysql.php");
* $sys_dbhost=...
* $sys_dbuser=...
* $sys_dbpasswd=...
@@ -53,8 +53,8 @@
* Notice the global vars $sys_dbhost,$sys_dbuser,$sys_dbpasswd,$sys_dbname that must be set up
* in other functions in this library
*/
-include_once("../../http/classes/class_mb_exception.php");
-include_once("../../http/classes/class_checkInput.php");
+include_once(dirname(__FILE__)."/../../http/classes/class_mb_exception.php");
+include_once(dirname(__FILE__)."/../../http/classes/class_checkInput.php");
function db_escape_string($unescaped_string){
return @pg_escape_string(stripslashes($unescaped_string));
}
@@ -316,6 +316,7 @@
function db_fetch_array($qhandle) {
return @pg_fetch_array($qhandle);
}
+
function db_fetch_all($qhandle){
return @pg_fetch_all($qhandle);
}
Modified: trunk/mapbender/http/php/mb_validatePermission.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mb_validatePermission.php?view=diff&rev=867&p1=trunk/mapbender/http/php/mb_validatePermission.php&p2=trunk/mapbender/http/php/mb_validatePermission.php&r1=866&r2=867
==============================================================================
--- trunk/mapbender/http/php/mb_validatePermission.php (original)
+++ trunk/mapbender/http/php/mb_validatePermission.php 2006-11-20 14:28:22+0000
@@ -18,8 +18,8 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
session_start();
-include_once("../../conf/mapbender.conf");
-include_once("../classes/class_administration.php");
+include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+include_once(dirname(__FILE__)."/../classes/class_administration.php");
if(!isset($_SESSION["mb_user_id"]) || !isset($_SESSION["mb_user_ip"]) || $_SESSION['mb_user_ip'] != $_SERVER['REMOTE_ADDR']){
header("Location: ".LOGIN);
exit;
Modified: trunk/mapbender/http/php/mb_validateSession.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mb_validateSession.php?view=diff&rev=867&p1=trunk/mapbender/http/php/mb_validateSession.php&p2=trunk/mapbender/http/php/mb_validateSession.php&r1=866&r2=867
==============================================================================
--- trunk/mapbender/http/php/mb_validateSession.php (original)
+++ trunk/mapbender/http/php/mb_validateSession.php 2006-11-20 14:28:22+0000
@@ -18,7 +18,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
session_start();
-include_once("../../conf/mapbender.conf");
+include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
if(!isset($_SESSION["mb_user_id"]) || !isset($_SESSION["mb_user_ip"]) || $_SESSION['mb_user_ip'] != $_SERVER['REMOTE_ADDR']){
header("Location: ".LOGIN);
exit;
More information about the Mapbender_commits
mailing list