mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 13:30:25 +02:00
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
This commit is contained in:
@@ -93,14 +93,12 @@ class utf_normalizer
|
||||
// Note: we do not check for $GLOBALS['utf_canonical_decomp']. It is assumed they are always loaded together
|
||||
if (!isset($GLOBALS['utf_nfc_qc']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/data/utf_nfc_qc.' . PHP_EXT);
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['utf_canonical_decomp']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/data/utf_canonical_decomp.' . PHP_EXT);
|
||||
}
|
||||
|
||||
// Replace any byte in the range 0x00..0x1F, except for \r, \n and \t
|
||||
@@ -133,14 +131,12 @@ class utf_normalizer
|
||||
|
||||
if (!isset($GLOBALS['utf_nfc_qc']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/data/utf_nfc_qc.' . PHP_EXT);
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['utf_canonical_decomp']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/data/utf_canonical_decomp.' . PHP_EXT);
|
||||
}
|
||||
|
||||
$str = self::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
|
||||
@@ -165,14 +161,12 @@ class utf_normalizer
|
||||
|
||||
if (!isset($GLOBALS['utf_nfkc_qc']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_nfkc_qc.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/data/utf_nfkc_qc.' . PHP_EXT);
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['utf_compatibility_decomp']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/data/utf_compatibility_decomp.' . PHP_EXT);
|
||||
}
|
||||
|
||||
$str = self::recompose($str, $pos, $len, $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
|
||||
@@ -197,8 +191,7 @@ class utf_normalizer
|
||||
|
||||
if (!isset($GLOBALS['utf_canonical_decomp']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/data/utf_canonical_decomp.' . PHP_EXT);
|
||||
}
|
||||
|
||||
$str = self::decompose($str, $pos, $len, $GLOBALS['utf_canonical_decomp']);
|
||||
@@ -223,8 +216,7 @@ class utf_normalizer
|
||||
|
||||
if (!isset($GLOBALS['utf_compatibility_decomp']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/data/utf_compatibility_decomp.' . PHP_EXT);
|
||||
}
|
||||
|
||||
$str = self::decompose($str, $pos, $len, $GLOBALS['utf_compatibility_decomp']);
|
||||
@@ -250,15 +242,13 @@ class utf_normalizer
|
||||
// Load some commonly-used tables
|
||||
if (!isset($utf_jamo_index, $utf_jamo_type, $utf_combining_class))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/data/utf_normalizer_common.' . PHP_EXT);
|
||||
}
|
||||
|
||||
// Load the canonical composition table
|
||||
if (!isset($utf_canonical_comp))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_canonical_comp.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/data/utf_canonical_comp.' . PHP_EXT);
|
||||
}
|
||||
|
||||
// Buffer the last ASCII char before the UTF-8 stuff if applicable
|
||||
@@ -951,8 +941,7 @@ class utf_normalizer
|
||||
// Load some commonly-used tables
|
||||
if (!isset($utf_combining_class))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/data/utf_normalizer_common.' . PHP_EXT);
|
||||
}
|
||||
|
||||
// UTF char length array
|
||||
|
Reference in New Issue
Block a user