mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 16:27:38 +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:
@@ -19,7 +19,7 @@ if (!defined('IN_PHPBB'))
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
|
||||
include_once(PHPBB_ROOT_PATH . 'includes/search/search.' . PHP_EXT);
|
||||
|
||||
/**
|
||||
* fulltext_mysql
|
||||
|
@@ -19,7 +19,7 @@ if (!defined('IN_PHPBB'))
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
|
||||
include_once(PHPBB_ROOT_PATH . 'includes/search/search.' . PHP_EXT);
|
||||
|
||||
/**
|
||||
* fulltext_native
|
||||
@@ -46,7 +46,7 @@ class fulltext_native extends search_backend
|
||||
*/
|
||||
function __construct(&$error)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $config;
|
||||
global $config;
|
||||
|
||||
$this->word_length = array('min' => $config['fulltext_native_min_chars'], 'max' => $config['fulltext_native_max_chars']);
|
||||
|
||||
@@ -55,7 +55,7 @@ class fulltext_native extends search_backend
|
||||
*/
|
||||
if (!class_exists('utf_normalizer'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/utf_normalizer.' . PHP_EXT);
|
||||
}
|
||||
|
||||
|
||||
@@ -966,7 +966,7 @@ class fulltext_native extends search_backend
|
||||
*/
|
||||
private function split_message($text)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $user;
|
||||
global $user;
|
||||
|
||||
$match = $words = array();
|
||||
|
||||
@@ -1408,7 +1408,6 @@ class fulltext_native extends search_backend
|
||||
*/
|
||||
private function cleanup($text, $allowed_chars = null)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
static $conv = array(), $conv_loaded = array();
|
||||
$words = $allow = array();
|
||||
|
||||
@@ -1598,7 +1597,7 @@ class fulltext_native extends search_backend
|
||||
if (!isset($conv_loaded[$idx]))
|
||||
{
|
||||
$conv_loaded[$idx] = 1;
|
||||
$file = $phpbb_root_path . 'includes/utf/data/search_indexer_' . $idx . '.' . $phpEx;
|
||||
$file = PHPBB_ROOT_PATH . 'includes/utf/data/search_indexer_' . $idx . '.' . PHP_EXT;
|
||||
|
||||
if (file_exists($file))
|
||||
{
|
||||
|
@@ -45,14 +45,14 @@ class search_backend
|
||||
{
|
||||
if (!sizeof($this->ignore_words))
|
||||
{
|
||||
global $user, $phpEx;
|
||||
global $user;
|
||||
|
||||
$words = array();
|
||||
|
||||
if (file_exists("{$user->lang_path}/search_ignore_words.$phpEx"))
|
||||
if (file_exists("{$user->lang_path}/search_ignore_words." . PHP_EXT))
|
||||
{
|
||||
// include the file containing ignore words
|
||||
include("{$user->lang_path}/search_ignore_words.$phpEx");
|
||||
include("{$user->lang_path}/search_ignore_words." . PHP_EXT);
|
||||
}
|
||||
|
||||
$this->ignore_words = $words;
|
||||
@@ -67,14 +67,14 @@ class search_backend
|
||||
{
|
||||
if (!sizeof($this->match_synonym))
|
||||
{
|
||||
global $user, $phpEx;
|
||||
global $user;
|
||||
|
||||
$synonyms = array();
|
||||
|
||||
if (file_exists("{$user->lang_path}/search_synonyms.$phpEx"))
|
||||
if (file_exists("{$user->lang_path}/search_synonyms." . PHP_EXT))
|
||||
{
|
||||
// include the file containing synonyms
|
||||
include("{$user->lang_path}/search_synonyms.$phpEx");
|
||||
include("{$user->lang_path}/search_synonyms." . PHP_EXT);
|
||||
}
|
||||
|
||||
$this->match_synonym = array_keys($synonyms);
|
||||
|
Reference in New Issue
Block a user