From 2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 29 May 2008 12:25:56 +0000 Subject: ok... i hope i haven't messed too much with the code and everything is still working. Changes: - Ascraeus now uses constants for the phpbb root path and the php extension. This ensures more security for external applications and modifications (no more overwriting of root path and extension possible through insecure mods and register globals enabled) as well as no more globalizing needed. - A second change implemented here is an additional short-hand-notation for append_sid(). It is allowed to omit the root path and extension now (for example calling append_sid('memberlist')) - in this case the root path and extension get added automatically. The hook is called after these are added. git-svn-id: file:///svn/phpbb/trunk@8572 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/db/db2.php | 2 +- phpBB/includes/db/dbal.php | 4 ++-- phpBB/includes/db/firebird.php | 2 +- phpBB/includes/db/mssql.php | 2 +- phpBB/includes/db/mssql_2005.php | 2 +- phpBB/includes/db/mssql_odbc.php | 2 +- phpBB/includes/db/mysql.php | 2 +- phpBB/includes/db/mysqli.php | 2 +- phpBB/includes/db/oracle.php | 2 +- phpBB/includes/db/postgres.php | 2 +- phpBB/includes/db/sqlite.php | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) (limited to 'phpBB/includes/db') diff --git a/phpBB/includes/db/db2.php b/phpBB/includes/db/db2.php index ecabc1c2e1..8a5ce0103d 100644 --- a/phpBB/includes/db/db2.php +++ b/phpBB/includes/db/db2.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) exit; } -include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); +include_once(PHPBB_ROOT_PATH . 'includes/db/dbal.' . PHP_EXT); /** * MSSQL Database Abstraction Layer diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index d385b98f55..4082edf24a 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -618,7 +618,7 @@ class dbal */ function sql_report($mode, $query = '') { - global $cache, $starttime, $phpbb_root_path, $user; + global $cache, $starttime, $user; if (empty($_REQUEST['explain'])) { @@ -649,7 +649,7 @@ class dbal SQL Report - +
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php index 48eb22046e..7760666ea1 100644 --- a/phpBB/includes/db/firebird.php +++ b/phpBB/includes/db/firebird.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) exit; } -include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); +include_once(PHPBB_ROOT_PATH . 'includes/db/dbal.' . PHP_EXT); /** * Firebird/Interbase Database Abstraction Layer diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index a6c8d26a4d..f842cb06d6 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) exit; } -include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); +include_once(PHPBB_ROOT_PATH . 'includes/db/dbal.' . PHP_EXT); /** * MSSQL Database Abstraction Layer diff --git a/phpBB/includes/db/mssql_2005.php b/phpBB/includes/db/mssql_2005.php index 9fc2e7027f..730013c6f5 100644 --- a/phpBB/includes/db/mssql_2005.php +++ b/phpBB/includes/db/mssql_2005.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) exit; } -include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); +include_once(PHPBB_ROOT_PATH . 'includes/db/dbal.' . PHP_EXT); /** * MSSQL Database Abstraction Layer diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php index f79cd55af4..86faf82036 100644 --- a/phpBB/includes/db/mssql_odbc.php +++ b/phpBB/includes/db/mssql_odbc.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) exit; } -include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); +include_once(PHPBB_ROOT_PATH . 'includes/db/dbal.' . PHP_EXT); /** * Unified ODBC functions diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php index 1e32b8178a..fd4dc74674 100644 --- a/phpBB/includes/db/mysql.php +++ b/phpBB/includes/db/mysql.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) exit; } -include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); +include_once(PHPBB_ROOT_PATH . 'includes/db/dbal.' . PHP_EXT); /** * MySQL Database Abstraction Layer diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php index 48ea8d3c53..a7ba07b8a5 100644 --- a/phpBB/includes/db/mysqli.php +++ b/phpBB/includes/db/mysqli.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) exit; } -include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); +include_once(PHPBB_ROOT_PATH . 'includes/db/dbal.' . PHP_EXT); /** * MySQLi Database Abstraction Layer diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php index 09648d9841..a66dfcce8b 100644 --- a/phpBB/includes/db/oracle.php +++ b/phpBB/includes/db/oracle.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) exit; } -include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); +include_once(PHPBB_ROOT_PATH . 'includes/db/dbal.' . PHP_EXT); /** * Oracle Database Abstraction Layer diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index f4237999ff..4c3e4729fa 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) exit; } -include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); +include_once(PHPBB_ROOT_PATH . 'includes/db/dbal.' . PHP_EXT); /** * PostgreSQL Database Abstraction Layer diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php index 64621496c4..f887e4e3b1 100644 --- a/phpBB/includes/db/sqlite.php +++ b/phpBB/includes/db/sqlite.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) exit; } -include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); +include_once(PHPBB_ROOT_PATH . 'includes/db/dbal.' . PHP_EXT); /** * Sqlite Database Abstraction Layer -- cgit v1.2.1