aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/common.php8
-rw-r--r--phpBB/develop/utf_normalizer_test.php2
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/download/file.php6
-rw-r--r--phpBB/includes/acm/acm_file.php43
-rw-r--r--phpBB/includes/acp/acp_captcha.php7
-rw-r--r--phpBB/includes/acp/acp_database.php2
-rwxr-xr-xphpBB/includes/acp/acp_inactive.php2
-rw-r--r--phpBB/includes/acp/acp_profile.php12
-rw-r--r--phpBB/includes/acp/acp_styles.php2
-rw-r--r--phpBB/includes/acp/acp_users.php2
-rw-r--r--phpBB/includes/acp/auth.php37
-rw-r--r--phpBB/includes/auth.php53
-rw-r--r--phpBB/includes/auth/auth_db.php5
-rw-r--r--phpBB/includes/bbcode.php2
-rw-r--r--phpBB/includes/cache.php86
-rw-r--r--phpBB/includes/captcha/captcha_gd.php132
-rw-r--r--phpBB/includes/captcha/captcha_non_gd.php56
-rw-r--r--phpBB/includes/db/db_tools.php2
-rw-r--r--phpBB/includes/db/dbal.php2
-rw-r--r--phpBB/includes/db/firebird.php46
-rw-r--r--phpBB/includes/db/mssql.php9
-rw-r--r--phpBB/includes/db/mysql.php31
-rw-r--r--phpBB/includes/db/oracle.php82
-rw-r--r--phpBB/includes/db/postgres.php18
-rw-r--r--phpBB/includes/diff/diff.php6
-rw-r--r--phpBB/includes/diff/renderer.php2
-rw-r--r--phpBB/includes/functions.php128
-rw-r--r--phpBB/includes/functions_compress.php62
-rw-r--r--phpBB/includes/functions_content.php9
-rw-r--r--phpBB/includes/functions_display.php2
-rw-r--r--phpBB/includes/functions_install.php2
-rw-r--r--phpBB/includes/functions_jabber.php96
-rw-r--r--phpBB/includes/functions_messenger.php82
-rw-r--r--phpBB/includes/functions_posting.php6
-rw-r--r--phpBB/includes/functions_profile_fields.php78
-rw-r--r--phpBB/includes/functions_template.php36
-rw-r--r--phpBB/includes/functions_transfer.php88
-rw-r--r--phpBB/includes/functions_upload.php4
-rw-r--r--phpBB/includes/functions_user.php100
-rw-r--r--phpBB/includes/hooks/index.php2
-rw-r--r--phpBB/includes/mcp/mcp_forum.php2
-rwxr-xr-xphpBB/includes/mcp/mcp_logs.php2
-rw-r--r--phpBB/includes/mcp/mcp_main.php2
-rwxr-xr-xphpBB/includes/mcp/mcp_notes.php2
-rw-r--r--phpBB/includes/mcp/mcp_post.php2
-rw-r--r--phpBB/includes/mcp/mcp_queue.php4
-rwxr-xr-xphpBB/includes/mcp/mcp_reports.php4
-rw-r--r--phpBB/includes/mcp/mcp_topic.php2
-rwxr-xr-xphpBB/includes/mcp/mcp_warn.php2
-rw-r--r--phpBB/includes/search/fulltext_mysql.php149
-rwxr-xr-xphpBB/includes/search/fulltext_native.php54
-rwxr-xr-xphpBB/includes/search/search.php37
-rw-r--r--phpBB/includes/session.php4
-rw-r--r--phpBB/includes/template.php47
-rw-r--r--phpBB/includes/ucp/ucp_confirm.php3
-rw-r--r--phpBB/includes/ucp/ucp_main.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php2
-rw-r--r--phpBB/includes/ucp/ucp_register.php2
-rw-r--r--phpBB/includes/utf/utf_normalizer.php194
-rw-r--r--phpBB/includes/utf/utf_tools.php229
-rw-r--r--phpBB/install/data/confusables.php650
-rw-r--r--phpBB/install/data/new_normalizer.php196
-rw-r--r--phpBB/install/database_update.php942
-rwxr-xr-xphpBB/install/index.php8
-rw-r--r--phpBB/install/install_convert.php2
-rwxr-xr-xphpBB/install/install_install.php22
-rw-r--r--phpBB/language/en/acp/search.php4
-rwxr-xr-xphpBB/language/en/install.php4
-rw-r--r--phpBB/memberlist.php2
-rw-r--r--phpBB/search.php2
-rw-r--r--phpBB/style.php4
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html8
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html2
-rw-r--r--phpBB/viewforum.php2
-rw-r--r--phpBB/viewtopic.php6
77 files changed, 829 insertions, 3123 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index ebffd46228..3e880076bf 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -20,7 +20,7 @@ $starttime = explode(' ', microtime());
$starttime = $starttime[1] + $starttime[0];
// Report all errors, except notices
-error_reporting(E_ALL ^ E_NOTICE);
+error_reporting(E_ALL | E_STRICT);
/*
* Remove variables created by register_globals from the global scope
@@ -199,7 +199,7 @@ set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handle
$user = new user();
$auth = new auth();
$template = new template();
-$cache = new cache();
+$cache = new acm();
$db = new $sql_db();
// Connect to DB
@@ -209,13 +209,13 @@ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, defined('
unset($dbpasswd);
// Grab global variables, re-cache if necessary
-$config = $cache->obtain_config();
+$config = cache::obtain_config();
// Add own hook handler
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
-foreach ($cache->obtain_hooks() as $hook)
+foreach (cache::obtain_hooks() as $hook)
{
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
}
diff --git a/phpBB/develop/utf_normalizer_test.php b/phpBB/develop/utf_normalizer_test.php
index 7705cd6851..2ce74fe833 100644
--- a/phpBB/develop/utf_normalizer_test.php
+++ b/phpBB/develop/utf_normalizer_test.php
@@ -198,7 +198,7 @@ while (!feof($fp))
foreach (array('nfc', 'nfkc', 'nfd', 'nfkd') as $form)
{
$utf_result = $utf_expected;
- utf_normalizer::$form($utf_result);
+ call_user_func(array('utf_normalizer', $form), $utf_result);
$hex_result = utf_to_hexseq($utf_result);
// echo "$form($utf_expected) == $utf_result\n";
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index d2e4ed52ee..6f180722e8 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -90,6 +90,7 @@
<li>[Fix] Allow single quotes in db password to be stored within config.php in installer</li>
<li>[Fix] Correctly quote db password for re-display in installer (Bug #16695 / thanks to m313 for reporting too - #s17235)</li>
<li>[Fix] Correctly handle empty imageset entries (Bug #16865)</li>
+ <li>[Change] Migrate phpBB to PHP versions >= 5.1</li>
</ul>
<a name="v30rc8"></a><h3>1.i. Changes since 3.0.RC8</h3>
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index 552c43335e..fe72fac4b1 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -24,7 +24,7 @@ if (isset($_GET['avatar']))
require($phpbb_root_path . 'includes/constants.' . $phpEx);
$db = new $sql_db();
- $cache = new cache();
+ $cache = new acm();
// Connect to DB
if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false))
@@ -36,7 +36,7 @@ if (isset($_GET['avatar']))
// worst-case default
$browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : 'msie 6.0';
- $config = $cache->obtain_config();
+ $config = cache::obtain_config();
$filename = $_GET['avatar'];
$avatar_group = false;
if ($filename[0] === 'g')
@@ -172,7 +172,7 @@ if ($attachment['is_orphan'])
}
// Obtain all extensions...
- $extensions = $cache->obtain_attach_extensions(true);
+ $extensions = cache::obtain_attach_extensions(true);
}
else
{
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
index 775e8d4495..fa6e79260b 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/includes/acm/acm_file.php
@@ -22,18 +22,18 @@ if (!defined('IN_PHPBB'))
*/
class acm
{
- var $vars = array();
- var $var_expires = array();
- var $is_modified = false;
+ private $vars = array();
+ private $var_expires = array();
+ private $is_modified = false;
- var $sql_rowset = array();
- var $sql_row_pointer = array();
- var $cache_dir = '';
+ public $sql_rowset = array();
+ private $sql_row_pointer = array();
+ public $cache_dir = '';
/**
* Set cache path
*/
- function acm()
+ function __construct()
{
global $phpbb_root_path;
$this->cache_dir = $phpbb_root_path . 'cache/';
@@ -42,25 +42,24 @@ class acm
/**
* Load global cache
*/
- function load()
+ private function load()
{
global $phpEx;
+
+ // grab the global cache
if (file_exists($this->cache_dir . 'data_global.' . $phpEx))
{
@include($this->cache_dir . 'data_global.' . $phpEx);
- }
- else
- {
- return false;
+ return true;
}
- return true;
+ return false;
}
/**
* Unload cache object
*/
- function unload()
+ public function unload()
{
$this->save();
unset($this->vars);
@@ -77,7 +76,7 @@ class acm
/**
* Save modified objects
*/
- function save()
+ private function save()
{
if (!$this->is_modified)
{
@@ -112,7 +111,7 @@ class acm
/**
* Tidy cache
*/
- function tidy()
+ public function tidy()
{
global $phpEx;
@@ -161,9 +160,9 @@ class acm
/**
* Get saved cache object
*/
- function get($var_name)
+ public function get($var_name)
{
- if ($var_name[0] == '_')
+ if ($var_name[0] === '_')
{
global $phpEx;
@@ -186,7 +185,7 @@ class acm
*/
function put($var_name, $var, $ttl = 31536000)
{
- if ($var_name[0] == '_')
+ if ($var_name[0] === '_')
{
global $phpEx;
@@ -252,7 +251,7 @@ class acm
{
global $phpEx;
- if ($var_name == 'sql' && !empty($table))
+ if ($var_name === 'sql' && !empty($table))
{
if (!is_array($table))
{
@@ -310,7 +309,7 @@ class acm
return;
}
- if ($var_name[0] == '_')
+ if ($var_name[0] === '_')
{
$this->remove_file($this->cache_dir . 'data' . $var_name . ".$phpEx");
}
@@ -330,7 +329,7 @@ class acm
*/
function _exists($var_name)
{
- if ($var_name[0] == '_')
+ if ($var_name[0] === '_')
{
global $phpEx;
return file_exists($this->cache_dir . 'data' . $var_name . ".$phpEx");
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
index 0d653c22d1..5b2b345ef8 100644
--- a/phpBB/includes/acp/acp_captcha.php
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -44,6 +44,7 @@ class acp_captcha
{
$config[$captcha_var] = (isset($_REQUEST[$captcha_var])) ? request_var($captcha_var, 0) : $config[$captcha_var];
}
+
if ($config['captcha_gd'])
{
include($phpbb_root_path . 'includes/captcha/captcha_gd.' . $phpEx);
@@ -52,9 +53,9 @@ class acp_captcha
{
include($phpbb_root_path . 'includes/captcha/captcha_non_gd.' . $phpEx);
}
- $captcha = new captcha();
- $captcha->execute(gen_rand_string(mt_rand(5, 8)), time());
- exit_handler();
+
+ captcha::execute(gen_rand_string(mt_rand(5, 8)), time());
+ exit();
}
$config_vars = array(
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 62331fbca2..a54230039d 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -446,7 +446,7 @@ class base_extractor
var $format;
var $run_comp = false;
- function base_extractor($download = false, $store = false, $format, $filename, $time)
+ function __construct($download = false, $store = false, $format, $filename, $time)
{
$this->download = $download;
$this->store = $store;
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php
index 5683ae5dab..90f326b099 100755
--- a/phpBB/includes/acp/acp_inactive.php
+++ b/phpBB/includes/acp/acp_inactive.php
@@ -24,7 +24,7 @@ class acp_inactive
var $u_action;
var $p_master;
- function acp_inactive(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 309f5d5e74..d89d01fcbc 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -729,7 +729,7 @@ class acp_profile
'S_FIELD_NO_VIEW' => ($cp->vars['field_no_view']) ? true : false,
'L_LANG_SPECIFIC' => sprintf($user->lang['LANG_SPECIFIC_OPTIONS'], $config['default_lang']),
- 'FIELD_TYPE' => $user->lang['FIELD_' . strtoupper($cp->profile_types[$field_type])],
+ 'FIELD_TYPE' => $user->lang['FIELD_' . strtoupper(custom_profile::profile_types[$field_type])],
'FIELD_IDENT' => $cp->vars['field_ident'],
'LANG_NAME' => $cp->vars['lang_name'],
'LANG_EXPLAIN' => $cp->vars['lang_explain'])
@@ -742,7 +742,7 @@ class acp_profile
'S_TEXT' => ($field_type == FIELD_TEXT) ? true : false,
'S_STRING' => ($field_type == FIELD_STRING) ? true : false,
- 'L_DEFAULT_VALUE_EXPLAIN' => $user->lang[strtoupper($cp->profile_types[$field_type]) . '_DEFAULT_VALUE_EXPLAIN'],
+ 'L_DEFAULT_VALUE_EXPLAIN' => $user->lang[strtoupper(custom_profile::profile_types[$field_type]) . '_DEFAULT_VALUE_EXPLAIN'],
'LANG_DEFAULT_VALUE' => $cp->vars['lang_default_value'])
);
}
@@ -769,7 +769,7 @@ class acp_profile
'S_BOOL' => ($field_type == FIELD_BOOL) ? true : false,
'S_DROPDOWN' => ($field_type == FIELD_DROPDOWN) ? true : false,
- 'L_LANG_OPTIONS_EXPLAIN' => $user->lang[strtoupper($cp->profile_types[$field_type]) . '_ENTRIES_EXPLAIN'],
+ 'L_LANG_OPTIONS_EXPLAIN' => $user->lang[strtoupper(custom_profile::profile_types[$field_type]) . '_ENTRIES_EXPLAIN'],
'LANG_OPTIONS' => ($field_type == FIELD_DROPDOWN) ? implode("\n", $cp->vars['lang_options']) : '',
'FIRST_LANG_OPTION' => ($field_type == FIELD_BOOL) ? $cp->vars['lang_options'][0] : '',
'SECOND_LANG_OPTION' => ($field_type == FIELD_BOOL) ? $cp->vars['lang_options'][1] : '')
@@ -786,7 +786,7 @@ class acp_profile
);
// Build options based on profile type
- $function = 'get_' . $cp->profile_types[$field_type] . '_options';
+ $function = 'get_' . custom_profile::profile_types[$field_type] . '_options';
$options = $cp->$function();
foreach ($options as $num => $option_ary)
@@ -851,7 +851,7 @@ class acp_profile
$template->assign_block_vars('fields', array(
'FIELD_IDENT' => $row['field_ident'],
- 'FIELD_TYPE' => $user->lang['FIELD_' . strtoupper($cp->profile_types[$row['field_type']])],
+ 'FIELD_TYPE' => $user->lang['FIELD_' . strtoupper(custom_profile::profile_types[$row['field_type']])],
'L_ACTIVATE_DEACTIVATE' => $user->lang[$active_lang],
'U_ACTIVATE_DEACTIVATE' => $this->u_action . "&amp;action=$active_value&amp;field_id=$id",
@@ -873,7 +873,7 @@ class acp_profile
}
$s_select_type = '';
- foreach ($cp->profile_types as $key => $value)
+ foreach (custom_profile::profile_types as $key => $value)
{
$s_select_type .= '<option value="' . $key . '">' . $user->lang['FIELD_' . strtoupper($value)] . '</option>';
}
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 31e99a6b0c..3fec4fc2ff 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -1782,7 +1782,7 @@ parse_css_file = {PARSE_CSS_FILE}
$theme_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['theme_name'], $style_row['theme_copyright'], $config['version']), $this->theme_cfg);
// Read old cfg file
- $items = $cache->obtain_cfg_items($style_row);
+ $items = cache::obtain_cfg_items($style_row);
$items = $items['theme'];
if (!isset($items['parse_css_file']))
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 310759d38c..252fb743cd 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -24,7 +24,7 @@ class acp_users
var $u_action;
var $p_master;
- function acp_users(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index b4ea0e46d0..9eee5829a1 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -27,7 +27,7 @@ class auth_admin extends auth
/**
* Init auth settings
*/
- function auth_admin()
+ function __construct()
{
global $db, $cache;
@@ -84,7 +84,7 @@ class auth_admin extends auth
* @param local|global $scope the scope defines the permission scope. If local, a forum_id is additionally required
* @param ACL_NEVER|ACL_NO|ACL_YES $acl_fill defines the mode those permissions not set are getting filled with
*/
- function get_mask($mode, $user_id = false, $group_id = false, $forum_id = false, $auth_option = false, $scope = false, $acl_fill = ACL_NEVER)
+ public function get_mask($mode, $user_id = false, $group_id = false, $forum_id = false, $auth_option = false, $scope = false, $acl_fill = ACL_NEVER)
{
global $db, $user;
@@ -235,7 +235,7 @@ class auth_admin extends auth
* Get permission mask for roles
* This function only supports getting masks for one role
*/
- function get_role_mask($role_id)
+ public function get_role_mask($role_id)
{
global $db;
@@ -273,7 +273,7 @@ class auth_admin extends auth
/**
* Display permission mask (assign to template)
*/
- function display_mask($mode, $permission_type, &$hold_ary, $user_mode = 'user', $local = false, $group_display = true)
+ public function display_mask($mode, $permission_type, array $hold_ary, $user_mode = 'user', $local = false, $group_display = true)
{
global $template, $user, $db, $phpbb_root_path, $phpEx;
@@ -451,7 +451,7 @@ class auth_admin extends auth
foreach ($hold_ary as $forum_id => $forum_array)
{
$content_array = $categories = array();
- $this->build_permission_array($hold_ary[$forum_id], $content_array, $categories, array_keys($ug_names_ary));
+ this::build_permission_array($hold_ary[$forum_id], $content_array, $categories, array_keys($ug_names_ary));
$template->assign_block_vars($tpl_pmask, array(
'NAME' => ($forum_id == 0) ? $forum_names_ary[0] : $forum_names_ary[$forum_id]['forum_name'],
@@ -519,7 +519,7 @@ class auth_admin extends auth
'FORUM_ID' => $forum_id)
);
- $this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
+ this::assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
unset($content_array[$ug_id]);
}
@@ -537,7 +537,7 @@ class auth_admin extends auth
}
$content_array = $categories = array();
- $this->build_permission_array($hold_ary[$ug_id], $content_array, $categories, array_keys($forum_names_ary));
+ this::build_permission_array($hold_ary[$ug_id], $content_array, $categories, array_keys($forum_names_ary));
$template->assign_block_vars($tpl_pmask, array(
'NAME' => $ug_name,
@@ -606,7 +606,7 @@ class auth_admin extends auth
'FORUM_ID' => $forum_id)
);
- $this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
+ this::assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
}
unset($hold_ary[$ug_id], $ug_names_ary[$ug_id]);
@@ -617,7 +617,7 @@ class auth_admin extends auth
/**
* Display permission mask for roles
*/
- function display_role_mask(&$hold_ary)
+ public function display_role_mask(array $hold_ary)
{
global $db, $template, $user, $phpbb_root_path, $phpbb_admin_path, $phpEx;
@@ -698,15 +698,10 @@ class auth_admin extends auth
* 'global' => array('optionA', 'optionB', ...)
* );
*/
- function acl_add_option($options)
+ public function acl_add_option(array $options)
{
global $db, $cache;
- if (!is_array($options))
- {
- return false;
- }
-
$cur_options = array();
$sql = 'SELECT auth_option, is_global, is_local
@@ -784,7 +779,7 @@ class auth_admin extends auth
/**
* Set a user or group ACL record
*/
- function acl_set($ug_type, $forum_id, $ug_id, $auth, $role_id = 0, $clear_prefetch = true)
+ public function acl_set($ug_type, $forum_id, $ug_id, $auth, $role_id = 0, $clear_prefetch = true)
{
global $db;
@@ -917,7 +912,7 @@ class auth_admin extends auth
/**
* Set a role-specific ACL record
*/
- function acl_set_role($role_id, $auth)
+ public function acl_set_role($role_id, $auth)
{
global $db;
@@ -980,7 +975,7 @@ class auth_admin extends auth
/**
* Remove local permission
*/
- function acl_delete($mode, $ug_id = false, $forum_id = false, $permission_type = false)
+ public function acl_delete($mode, $ug_id = false, $forum_id = false, $permission_type = false)
{
global $db;
@@ -1088,7 +1083,7 @@ class auth_admin extends auth
* Assign category to template
* used by display_mask()
*/
- function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $show_trace = false, $s_view)
+ private static function assign_cat_array(array $category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $show_trace = false, $s_view)
{
global $template, $user, $phpbb_admin_path, $phpEx;
@@ -1164,7 +1159,7 @@ class auth_admin extends auth
* Building content array from permission rows with explicit key ordering
* used by display_mask()
*/
- function build_permission_array(&$permission_row, &$content_array, &$categories, $key_sort_array)
+ public static function build_permission_array(array $permission_row, array &$content_array, array &$categories, array $key_sort_array)
{
global $user;
@@ -1229,7 +1224,7 @@ class auth_admin extends auth
* "more" permissions by this.
* Admin permissions will not be copied.
*/
- function ghost_permissions($from_user_id, $to_user_id)
+ public function ghost_permissions($from_user_id, $to_user_id)
{
global $db;
diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php
index c965149018..ccace05f3a 100644
--- a/phpBB/includes/auth.php
+++ b/phpBB/includes/auth.php
@@ -22,15 +22,15 @@ if (!defined('IN_PHPBB'))
*/
class auth
{
- var $acl = array();
- var $cache = array();
- var $acl_options = array();
- var $acl_forum_ids = false;
+ private $acl = array();
+ private $cache = array();
+ public $acl_options = array();
+ private $acl_forum_ids = false;
/**
* Init permissions
*/
- function acl(&$userdata)
+ function acl(array &$userdata)
{
global $db, $cache;
@@ -100,7 +100,7 @@ class auth
* If a forum id is specified the local option will be combined with a global option if one exist.
* If a forum id is not specified, only the global option will be checked.
*/
- function acl_get($opt, $f = 0)
+ public function acl_get($opt, $f = 0)
{
$negate = false;
@@ -110,6 +110,7 @@ class auth
$opt = substr($opt, 1);
}
+ // @todo: use the ref technique to reduce opcode generation
if (!isset($this->cache[$f][$opt]))
{
// We combine the global/local option with an OR because some options are global and local.
@@ -137,7 +138,7 @@ class auth
}
// Founder always has all global options set to true...
- return ($negate) ? !$this->cache[$f][$opt] : $this->cache[$f][$opt];
+ return $negate xor $this->cache[$f][$opt];
}
/**
@@ -146,7 +147,7 @@ class auth
*
* @param bool $clean set to true if only values needs to be returned which are set/unset
*/
- function acl_getf($opt, $clean = false)
+ public function acl_getf($opt, $clean = false)
{
$acl_f = array();
$negate = false;
@@ -196,14 +197,11 @@ class auth
if (!$clean)
{
- $acl_f[$f][$opt] = ($negate) ? !$allowed : $allowed;
+ $acl_f[$f][$opt] = $negate xor $allowed;
}
- else
+ else if ($negate xor $allowed)
{
- if (($negate && !$allowed) || (!$negate && $allowed))
- {
- $acl_f[$f][$opt] = 1;
- }
+ $acl_f[$f][$opt] = 1;
}
}
}
@@ -227,7 +225,7 @@ class auth
* If global option is checked it returns the global state (same as acl_get($opt))
* Local option has precedence...
*/
- function acl_getf_global($opt)
+ public function acl_getf_global($opt)
{
if (is_array($opt))
{
@@ -271,7 +269,7 @@ class auth
/**
* Get permission settings (more than one)
*/
- function acl_gets()
+ public function acl_gets()
{
$args = func_get_args();
$f = array_pop($args);
@@ -300,7 +298,7 @@ class auth
/**
* Get permission listing based on user_id/options/forum_ids
*/
- function acl_get_list($user_id = false, $opts = false, $forum_id = false)
+ public function acl_get_list($user_id = false, $opts = false, $forum_id = false)
{
$hold_ary = $this->acl_raw_data($user_id, $opts, $forum_id);
@@ -325,7 +323,7 @@ class auth
/**
* Cache data to user_permissions row
*/
- function acl_cache(&$userdata)
+ public function acl_cache(array &$userdata)
{
global $db;
@@ -403,7 +401,7 @@ class auth
/**
* Build bitstring from permission set
*/
- function build_bitstring(&$hold_ary)
+ protected function build_bitstring(&$hold_ary)
{
$hold_str = '';
@@ -464,7 +462,7 @@ class auth
/**
* Clear one or all users cached permission settings
*/
- function acl_clear_prefetch($user_id = false)
+ public function acl_clear_prefetch($user_id = false)
{
global $db;
@@ -487,8 +485,9 @@ class auth
/**
* Get assigned roles
+ * @todo: protected or public?
*/
- function acl_role_data($user_type, $role_type, $ug_id = false, $forum_id = false)
+ public function acl_role_data($user_type, $role_type, $ug_id = false, $forum_id = false)
{
global $db;
@@ -520,8 +519,9 @@ class auth
/**
* Get raw acl data based on user/option/forum
+ * @todo: protected or public?
*/
- function acl_raw_data($user_id = false, $opts = false, $forum_id = false)
+ public function acl_raw_data($user_id = false, $opts = false, $forum_id = false)
{
global $db;
@@ -632,6 +632,7 @@ class auth
while ($row = $db->sql_fetchrow($result))
{
+ // @todo: use the ref technique to reduce opcode generation
if (!isset($hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']]) || (isset($hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']]) && $hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] != ACL_NEVER))
{
$setting = ($row['auth_role_id']) ? $row['role_auth_setting'] : $row['auth_setting'];
@@ -663,7 +664,7 @@ class auth
/**
* Get raw user based permission settings
*/
- function acl_user_raw_data($user_id = false, $opts = false, $forum_id = false)
+ public function acl_user_raw_data($user_id = false, $opts = false, $forum_id = false)
{
global $db;
@@ -717,7 +718,7 @@ class auth
/**
* Get raw group based permission settings
*/
- function acl_group_raw_data($group_id = false, $opts = false, $forum_id = false)
+ public function acl_group_raw_data($group_id = false, $opts = false, $forum_id = false)
{
global $db;
@@ -771,7 +772,7 @@ class auth
/**
* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
*/
- function login($username, $password, $autologin = false, $viewonline = 1, $admin = 0)
+ public function login($username, $password, $autologin = false, $viewonline = 1, $admin = 0)
{
global $config, $db, $user, $phpbb_root_path, $phpEx;
@@ -873,7 +874,7 @@ class auth
/**
* Fill auth_option statement for later querying based on the supplied options
*/
- function build_auth_option_statement($key, $auth_options, &$sql_opts)
+ private function build_auth_option_statement($key, $auth_options, &$sql_opts)
{
global $db;
diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php
index 432ae92d21..aa09710730 100644
--- a/phpBB/includes/auth/auth_db.php
+++ b/phpBB/includes/auth/auth_db.php
@@ -112,8 +112,9 @@ function login_db(&$username, &$password)
}
}
+ // @todo: safe to remove?
// If the password convert flag is set we need to convert it
- if ($row['user_pass_convert'])
+ /*if ($row['user_pass_convert'])
{
// in phpBB2 passwords were used exactly as they were sent, with addslashes applied
$password_old_format = isset($_REQUEST['password']) ? (string) $_REQUEST['password'] : '';
@@ -161,7 +162,7 @@ function login_db(&$username, &$password)
);
}
}
- }
+ }*/
// Check password ...
if (!$row['user_pass_convert'] && phpbb_check_hash($password, $row['user_password']))
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index ef73762582..354885143c 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -36,7 +36,7 @@ class bbcode
* Constructor
* Init bbcode cache entries if bitfield is specified
*/
- function bbcode($bitfield = '')
+ function __construct($bitfield = '')
{
if ($bitfield)
{
diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php
index 31b8b73e10..52e0007b28 100644
--- a/phpBB/includes/cache.php
+++ b/phpBB/includes/cache.php
@@ -20,16 +20,16 @@ if (!defined('IN_PHPBB'))
* Class for grabbing/handling cached entries, extends acm_file or acm_db depending on the setup
* @package acm
*/
-class cache extends acm
+class cache
{
/**
* Get config values
*/
- function obtain_config()
+ public static function obtain_config()
{
- global $db;
+ global $db, $cache;
- if (($config = $this->get('config')) !== false)
+ if (($config = $cache->get('config')) !== false)
{
$sql = 'SELECT config_name, config_value
FROM ' . CONFIG_TABLE . '
@@ -61,7 +61,7 @@ class cache extends acm
}
$db->sql_freeresult($result);
- $this->put('config', $cached_config);
+ $cache->put('config', $cached_config);
}
return $config;
@@ -71,12 +71,14 @@ class cache extends acm
* Obtain list of naughty words and build preg style replacement arrays for use by the
* calling script
*/
- function obtain_word_list()
+ public static function obtain_word_list()
{
- global $db;
+ global $cache;
- if (($censors = $this->get('_word_censors')) === false)
+ if (($censors = $cache->get('_word_censors')) === false)
{
+ global $db;
+
$sql = 'SELECT word, replacement
FROM ' . WORDS_TABLE;
$result = $db->sql_query($sql);
@@ -89,7 +91,7 @@ class cache extends acm
}
$db->sql_freeresult($result);
- $this->put('_word_censors', $censors);
+ $cache->put('_word_censors', $censors);
}
return $censors;
@@ -98,12 +100,14 @@ class cache extends acm
/**
* Obtain currently listed icons
*/
- function obtain_icons()
+ public static function obtain_icons()
{
- if (($icons = $this->get('_icons')) === false)
+ global $cache;
+
+ if (($icons = $cache->get('_icons')) === false)
{
global $db;
-
+
// Topic icons
$sql = 'SELECT *
FROM ' . ICONS_TABLE . '
@@ -120,7 +124,7 @@ class cache extends acm
}
$db->sql_freeresult($result);
- $this->put('_icons', $icons);
+ $cache->put('_icons', $icons);
}
return $icons;
@@ -129,12 +133,14 @@ class cache extends acm
/**
* Obtain ranks
*/
- function obtain_ranks()
+ public static function obtain_ranks()
{
- if (($ranks = $this->get('_ranks')) === false)
+ global $cache;
+
+ if (($ranks = $cache->get('_ranks')) === false)
{
global $db;
-
+
$sql = 'SELECT *
FROM ' . RANKS_TABLE . '
ORDER BY rank_min DESC';
@@ -161,7 +167,7 @@ class cache extends acm
}
$db->sql_freeresult($result);
- $this->put('_ranks', $ranks);
+ $cache->put('_ranks', $ranks);
}
return $ranks;
@@ -174,9 +180,11 @@ class cache extends acm
*
* @return array allowed extensions array.
*/
- function obtain_attach_extensions($forum_id)
+ public static function obtain_attach_extensions($forum_id)
{
- if (($extensions = $this->get('_extensions')) === false)
+ global $cache;
+
+ if (($extensions = $cache->get('_extensions')) === false)
{
global $db;
@@ -220,7 +228,7 @@ class cache extends acm
}
$db->sql_freeresult($result);
- $this->put('_extensions', $extensions);
+ $cache->put('_extensions', $extensions);
}
// Forum post
@@ -279,12 +287,14 @@ class cache extends acm
/**
* Obtain active bots
*/
- function obtain_bots()
+ public static function obtain_bots()
{
- if (($bots = $this->get('_bots')) === false)
+ global $cache;
+
+ if (($bots = $cache->get('_bots')) === false)
{
global $db;
-
+
switch ($db->sql_layer)
{
case 'mssql':
@@ -319,7 +329,7 @@ class cache extends acm
}
$db->sql_freeresult($result);
- $this->put('_bots', $bots);
+ $cache->put('_bots', $bots);
}
return $bots;
@@ -328,9 +338,9 @@ class cache extends acm
/**
* Obtain cfg file data
*/
- function obtain_cfg_items($theme)
+ public static function obtain_cfg_items($theme)
{
- global $config, $phpbb_root_path;
+ global $config, $phpbb_root_path, $cache;
$parsed_items = array(
'theme' => array(),
@@ -340,7 +350,7 @@ class cache extends acm
foreach ($parsed_items as $key => $parsed_array)
{
- $parsed_array = $this->get('_cfg_' . $key . '_' . $theme[$key . '_path']);
+ $parsed_array = $cache->get('_cfg_' . $key . '_' . $theme[$key . '_path']);
if ($parsed_array === false)
{
@@ -366,7 +376,7 @@ class cache extends acm
$parsed_array = parse_cfg_file($filename);
$parsed_array['filetime'] = @filemtime($filename);
- $this->put('_cfg_' . $key . '_' . $theme[$key . '_path'], $parsed_array);
+ $cache->put('_cfg_' . $key . '_' . $theme[$key . '_path'], $parsed_array);
}
$parsed_items[$key] = $parsed_array;
}
@@ -377,9 +387,11 @@ class cache extends acm
/**
* Obtain disallowed usernames
*/
- function obtain_disallowed_usernames()
+ public static function obtain_disallowed_usernames()
{
- if (($usernames = $this->get('_disallowed_usernames')) === false)
+ global $cache;
+
+ if (($usernames = $cache->get('_disallowed_usernames')) === false)
{
global $db;
@@ -394,7 +406,7 @@ class cache extends acm
}
$db->sql_freeresult($result);
- $this->put('_disallowed_usernames', $usernames);
+ $cache->put('_disallowed_usernames', $usernames);
}
return $usernames;
@@ -403,12 +415,14 @@ class cache extends acm
/**
* Obtain hooks...
*/
- function obtain_hooks()
+ public static function obtain_hooks()
{
- global $phpbb_root_path, $phpEx;
+ global $cache;
- if (($hook_files = $this->get('_hooks')) === false)
+ if (($hook_files = $cache->get('_hooks')) === false)
{
+ global $phpbb_root_path;
+
$hook_files = array();
// Now search for hooks...
@@ -416,6 +430,8 @@ class cache extends acm
if ($dh)
{
+ global $phpEx;
+
while (($file = readdir($dh)) !== false)
{
if (strpos($file, 'hook_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx)
@@ -426,7 +442,7 @@ class cache extends acm
closedir($dh);
}
- $this->put('_hooks', $hook_files);
+ $cache->put('_hooks', $hook_files);
}
return $hook_files;
diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php
index 9c9eb5eda7..74afc152a2 100644
--- a/phpBB/includes/captcha/captcha_gd.php
+++ b/phpBB/includes/captcha/captcha_gd.php
@@ -24,20 +24,20 @@ if (!defined('IN_PHPBB'))
*/
class captcha
{
- var $width = 360;
- var $height = 96;
+ const width = 360;
+ const height = 96;
/**
* Create the image containing $code with a seed of $seed
*/
- function execute($code, $seed)
+ public static function execute($code, $seed)
{
global $config;
srand($seed);
mt_srand($seed);
// Create image
- $img = imagecreatetruecolor($this->width, $this->height);
+ $img = imagecreatetruecolor(self::width, self::height);
// Generate colours
$colour = new colour_manager($img, array(
@@ -53,15 +53,15 @@ class captcha
// Generate code characters
$characters = $sizes = $bounding_boxes = array();
- $width_avail = $this->width - 15;
+ $width_avail = self::width - 15;
$code_len = strlen($code);
- $captcha_bitmaps = $this->captcha_bitmaps();
+ $captcha_bitmaps = self::captcha_bitmaps();
for ($i = 0; $i < $code_len; ++$i)
{
$characters[$i] = new char_cube3d($captcha_bitmaps, $code[$i]);
- list($min, $max) = $characters[$i]->range();
+ list($min, $max) = char_cube3d::range();
$sizes[$i] = mt_rand($min, $max);
$box = $characters[$i]->dimensions($sizes[$i]);
@@ -82,20 +82,20 @@ class captcha
if ($config['captcha_gd_x_grid'])
{
$grid = (int) $config['captcha_gd_x_grid'];
- for ($y = 0; $y < $this->height; $y += mt_rand($grid - 2, $grid + 2))
+ for ($y = 0; $y < self::height; $y += mt_rand($grid - 2, $grid + 2))
{
$current_colour = $scheme[array_rand($scheme)];
- imageline($img, mt_rand(0,4), mt_rand($y - 3, $y), mt_rand($this->width - 5, $this->width), mt_rand($y - 3, $y), $current_colour);
+ imageline($img, mt_rand(0,4), mt_rand($y - 3, $y), mt_rand(self::width - 5, self::width), mt_rand($y - 3, $y), $current_colour);
}
}
if ($config['captcha_gd_y_grid'])
{
$grid = (int) $config['captcha_gd_y_grid'];
- for ($x = 0; $x < $this->width; $x += mt_rand($grid - 2, $grid + 2))
+ for ($x = 0; $x < self::width; $x += mt_rand($grid - 2, $grid + 2))
{
$current_colour = $scheme[array_rand($scheme)];
- imagedashedline($img, mt_rand($x -3, $x + 3), mt_rand(0, 4), mt_rand($x -3, $x + 3), mt_rand($this->height - 5, $this->height), $current_colour);
+ imagedashedline($img, mt_rand($x -3, $x + 3), mt_rand(0, 4), mt_rand($x -3, $x + 3), mt_rand(self::height - 5, self::height), $current_colour);
}
}
@@ -104,7 +104,7 @@ class captcha
{
$dimm = $bounding_boxes[$i];
$xoffset += ($offset[$i] - $dimm[0]);
- $yoffset = mt_rand(-$dimm[1], $this->height - $dimm[3]);
+ $yoffset = mt_rand(-$dimm[1], self::height - $dimm[3]);
$characters[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
$xoffset += $dimm[2];
@@ -112,7 +112,7 @@ class captcha
if ($config['captcha_gd_foreground_noise'])
{
- $this->noise_line($img, 0, 0, $this->width, $this->height, $colour->get_resource('background'), $scheme, $bg_colours);
+ self::noise_line($img, 0, 0, self::width, self::height, $colour->get_resource('background'), $scheme, $bg_colours);
}
// Send image
@@ -125,7 +125,7 @@ class captcha
/**
* Noise line
*/
- function noise_line($img, $min_x, $min_y, $max_x, $max_y, $bg, $font, $non_font)
+ private static function noise_line($img, $min_x, $min_y, $max_x, $max_y, $bg, $font, $non_font)
{
imagesetthickness($img, 2);
@@ -174,7 +174,7 @@ class captcha
/**
* Return bitmaps
*/
- function captcha_bitmaps()
+ private static function captcha_bitmaps()
{
return array(
'width' => 9,
@@ -786,21 +786,21 @@ class captcha
*/
class char_cube3d
{
- var $bitmap;
- var $bitmap_width;
- var $bitmap_height;
-
- var $basis_matrix = array(array(1, 0, 0), array(0, 1, 0), array(0, 0, 1));
- var $abs_x = array(1, 0);
- var $abs_y = array(0, 1);
- var $x = 0;
- var $y = 1;
- var $z = 2;
- var $letter = '';
+ private $bitmap;
+ private $bitmap_width;
+ private $bitmap_height;
+
+ private $basis_matrix = array(array(1, 0, 0), array(0, 1, 0), array(0, 0, 1));
+ private $abs_x = array(1, 0);
+ private $abs_y = array(0, 1);
+ private $x = 0;
+ private $y = 1;
+ private $z = 2;
+ private $letter = '';
/**
*/
- function char_cube3d(&$bitmaps, $letter)
+ function __construct(&$bitmaps, $letter)
{
$this->bitmap = $bitmaps['data'][$letter];
$this->bitmap_width = $bitmaps['width'];
@@ -886,7 +886,7 @@ class char_cube3d
/**
* Draw a character
*/
- function drawchar($scale, $xoff, $yoff, $img, $background, $colours)
+ public function drawchar($scale, $xoff, $yoff, $img, $background, $colours)
{
$width = $this->bitmap_width;
$height = $this->bitmap_height;
@@ -915,16 +915,16 @@ class char_cube3d
$origin = array(0, 0, 0);
$xvec = $this->scale($this->basis_matrix[$this->x], $scale);
$yvec = $this->scale($this->basis_matrix[$this->y], $scale);
- $face_corner = $this->sum2($xvec, $yvec);
+ $face_corner = self::sum2($xvec, $yvec);
$zvec = $this->scale($this->basis_matrix[$this->z], $scale);
- $x_corner = $this->sum2($xvec, $zvec);
- $y_corner = $this->sum2($yvec, $zvec);
+ $x_corner = self::sum2($xvec, $zvec);
+ $y_corner = self::sum2($yvec, $zvec);
- imagefilledpolygon($img, $this->gen_poly($xo, $yo, $origin, $xvec, $x_corner,$zvec), 4, $colour1);
- imagefilledpolygon($img, $this->gen_poly($xo, $yo, $origin, $yvec, $y_corner,$zvec), 4, $colour2);
+ imagefilledpolygon($img, self::gen_poly($xo, $yo, $origin, $xvec, $x_corner,$zvec), 4, $colour1);
+ imagefilledpolygon($img, self::gen_poly($xo, $yo, $origin, $yvec, $y_corner,$zvec), 4, $colour2);
- $face = $this->gen_poly($xo, $yo, $origin, $xvec, $face_corner, $yvec);
+ $face = self::gen_poly($xo, $yo, $origin, $xvec, $face_corner, $yvec);
imagefilledpolygon($img, $face, 4, $background);
imagepolygon($img, $face, 4, $colour1);
@@ -936,7 +936,7 @@ class char_cube3d
/*
* return a roughly acceptable range of sizes for rendering with this texttype
*/
- function range()
+ public static function range()
{
return array(3, 4);
}
@@ -944,7 +944,7 @@ class char_cube3d
/**
* Vector length
*/
- function vectorlen($vector)
+ private static function vectorlen($vector)
{
return sqrt(pow($vector[0], 2) + pow($vector[1], 2) + pow($vector[2], 2));
}
@@ -952,10 +952,10 @@ class char_cube3d
/**
* Normalize
*/
- function normalize(&$vector, $length = 1)
+ private static function normalize(&$vector, $length = 1)
{
$length = (( $length < 1) ? 1 : $length);
- $length /= $this->vectorlen($vector);
+ $length /= self::vectorlen($vector);
$vector[0] *= $length;
$vector[1] *= $length;
$vector[2] *= $length;
@@ -963,7 +963,7 @@ class char_cube3d
/**
*/
- function cross_product($vector1, $vector2)
+ private static function cross_product($vector1, $vector2)
{
$retval = array(0, 0, 0);
$retval[0] = (($vector1[1] * $vector2[2]) - ($vector1[2] * $vector2[1]));
@@ -975,21 +975,21 @@ class char_cube3d
/**
*/
- function sum($vector1, $vector2)
+ private static function sum($vector1, $vector2)
{
return array($vector1[0] + $vector2[0], $vector1[1] + $vector2[1], $vector1[2] + $vector2[2]);
}
/**
*/
- function sum2($vector1, $vector2)
+ private static function sum2($vector1, $vector2)
{
return array($vector1[0] + $vector2[0], $vector1[1] + $vector2[1]);
}
/**
*/
- function scale($vector, $length)
+ private static function scale($vector, $length)
{
if (sizeof($vector) == 2)
{
@@ -1001,7 +1001,7 @@ class char_cube3d
/**
*/
- function gen_poly($xoff, $yoff, &$vec1, &$vec2, &$vec3, &$vec4)
+ private static function gen_poly($xoff, $yoff, &$vec1, &$vec2, &$vec3, &$vec4)
{
$poly = array();
$poly[0] = $xoff + $vec1[0];
@@ -1019,7 +1019,7 @@ class char_cube3d
/**
* dimensions
*/
- function dimensions($size)
+ public function dimensions($size)
{
$xn = $this->scale($this->basis_matrix[$this->x], -($this->bitmap_width / 2) * $size);
$xp = $this->scale($this->basis_matrix[$this->x], ($this->bitmap_width / 2) * $size);
@@ -1027,10 +1027,10 @@ class char_cube3d
$yp = $this->scale($this->basis_matrix[$this->y], ($this->bitmap_height / 2) * $size);
$p = array();
- $p[0] = $this->sum2($xn, $yn);
- $p[1] = $this->sum2($xp, $yn);
- $p[2] = $this->sum2($xp, $yp);
- $p[3] = $this->sum2($xn, $yp);
+ $p[0] = self::sum2($xn, $yn);
+ $p[1] = self::sum2($xp, $yn);
+ $p[2] = self::sum2($xp, $yp);
+ $p[3] = self::sum2($xn, $yp);
$min_x = $max_x = $p[0][0];
$min_y = $max_y = $p[0][1];
@@ -1052,15 +1052,15 @@ class char_cube3d
*/
class colour_manager
{
- var $img;
- var $mode;
- var $colours;
- var $named_colours;
+ private $img;
+ private $mode;
+ private $colours;
+ private $named_colours;
/**
* Create the colour manager, link it to the image resource
*/
- function colour_manager($img, $background = false, $mode = 'ahsv')
+ function __construct($img, $background = false, $mode = 'ahsv')
{
$this->img = $img;
$this->mode = $mode;
@@ -1077,7 +1077,7 @@ class colour_manager
/**
* Lookup a named colour resource
*/
- function get_resource($named_colour)
+ public function get_resource($named_colour)
{
if (isset($this->named_colours[$named_colour]))
{
@@ -1095,7 +1095,7 @@ class colour_manager
/**
* Assign a name to a colour resource
*/
- function name_colour($name, $resource)
+ private function name_colour($name, $resource)
{
$this->named_colours[$name] = $resource;
}
@@ -1103,7 +1103,7 @@ class colour_manager
/**
* names and allocates a colour resource
*/
- function allocate_named($name, $colour, $mode = false)
+ private function allocate_named($name, $colour, $mode = false)
{
$resource = $this->allocate($colour, $mode);
@@ -1117,7 +1117,7 @@ class colour_manager
/**
* allocates a specified colour into the image
*/
- function allocate($colour, $mode = false)
+ private function allocate($colour, $mode = false)
{
if ($mode === false)
{
@@ -1164,7 +1164,7 @@ class colour_manager
/**
* randomly generates a colour, with optional params
*/
- function random_colour($params = array(), $mode = false)
+ private function random_colour($params = array(), $mode = false)
{
if ($mode === false)
{
@@ -1263,7 +1263,7 @@ class colour_manager
/**
*/
- function colour_scheme($resource, $include_original = true)
+ public function colour_scheme($resource, $include_original = true)
{
$mode = 'hsv';
@@ -1289,7 +1289,7 @@ class colour_manager
/**
*/
- function mono_range($resource, $count = 5, $include_original = true)
+ public function mono_range($resource, $count = 5, $include_original = true)
{
if (is_array($resource))
{
@@ -1331,7 +1331,7 @@ class colour_manager
/**
* Convert from one colour model to another
*/
- function model_convert($colour, $from_model, $to_model)
+ private static function model_convert($colour, $from_model, $to_model)
{
if ($from_model == $to_model)
{
@@ -1387,7 +1387,7 @@ class colour_manager
/**
* Slightly altered from wikipedia's algorithm
*/
- function hsv2rgb($hsv)
+ private static function hsv2rgb($hsv)
{
colour_manager::normalize_hue($hsv[0]);
@@ -1450,7 +1450,7 @@ class colour_manager
/**
* (more than) Slightly altered from wikipedia's algorithm
*/
- function rgb2hsv($rgb)
+ private static function rgb2hsv($rgb)
{
$r = min(255, max(0, $rgb[0]));
$g = min(255, max(0, $rgb[1]));
@@ -1488,7 +1488,7 @@ class colour_manager
/**
*/
- function normalize_hue(&$hue)
+ private static function normalize_hue(&$hue)
{
$hue %= 360;
@@ -1501,7 +1501,7 @@ class colour_manager
/**
* Alternate hue to hue
*/
- function ah2h($ahue)
+ private static function ah2h($ahue)
{
if (is_array($ahue))
{
@@ -1535,7 +1535,7 @@ class colour_manager
/**
* hue to Alternate hue
*/
- function h2ah($hue)
+ private static function h2ah($hue)
{
if (is_array($hue))
{
diff --git a/phpBB/includes/captcha/captcha_non_gd.php b/phpBB/includes/captcha/captcha_non_gd.php
index f82896f628..978aaa575f 100644
--- a/phpBB/includes/captcha/captcha_non_gd.php
+++ b/phpBB/includes/captcha/captcha_non_gd.php
@@ -23,25 +23,15 @@ if (!defined('IN_PHPBB'))
*/
class captcha
{
- var $filtered_pngs;
- var $width = 320;
- var $height = 50;
-
- /**
- * Define filtered pngs on init
- */
- function captcha()
- {
- // If we can we will generate a single filtered png, we avoid nastiness via emulation of some Zlib stuff
- $this->define_filtered_pngs();
- }
+ const width = 320;
+ const height = 50;
/**
* Create the image containing $code with a seed of $seed
*/
- function execute($code, $seed)
+ public static function execute($code, $seed)
{
- $img_height = $this->height - 10;
+ $img_height = self::height - 10;
$img_width = 0;
mt_srand($seed);
@@ -49,27 +39,30 @@ class captcha
$char_widths = $hold_chars = array();
$code_len = strlen($code);
+ // If we can we will generate a single filtered png, we avoid nastiness via emulation of some Zlib stuff
+ $filtered_pngs = self::define_filtered_pngs();
+
for ($i = 0; $i < $code_len; $i++)
{
$char = $code[$i];
$width = mt_rand(0, 4);
- $raw_width = $this->filtered_pngs[$char]['width'];
+ $raw_width = $filtered_pngs[$char]['width'];
$char_widths[$i] = $width;
$img_width += $raw_width - $width;
// Split the char into chunks of $raw_width + 1 length
if (empty($hold_chars[$char]))
{
- $hold_chars[$char] = str_split(base64_decode($this->filtered_pngs[$char]['data']), $raw_width + 1);
+ $hold_chars[$char] = str_split(base64_decode($filtered_pngs[$char]['data']), $raw_width + 1);
}
}
- $offset_x = mt_rand(0, $this->width - $img_width);
- $offset_y = mt_rand(0, $this->height - $img_height);
+ $offset_x = mt_rand(0, self::width - $img_width);
+ $offset_y = mt_rand(0, self::height - $img_height);
$image = '';
- for ($i = 0; $i < $this->height; $i++)
+ for ($i = 0; $i < self::height; $i++)
{
$image .= chr(0);
@@ -82,10 +75,10 @@ class captcha
for ($j = 0; $j < $code_len; $j++)
{
- $image .= $this->randomise(substr($hold_chars[$code{$j}][$i - $offset_y - 1], 1), $char_widths[$j]);
+ $image .= self::randomise(substr($hold_chars[$code{$j}][$i - $offset_y - 1], 1), $char_widths[$j]);
}
- for ($j = $offset_x + $img_width; $j < $this->width; $j++)
+ for ($j = $offset_x + $img_width; $j < self::width; $j++)
{
$image .= chr(mt_rand(140, 255));
}
@@ -100,13 +93,12 @@ class captcha
}
unset($hold_chars);
- $image = $this->create_png($image, $this->width, $this->height);
+ $image = self::create_png($image, $this->width, $this->height);
// Output image
header('Content-Type: image/png');
header('Cache-control: no-cache, no-store');
echo $image;
- exit;
}
/**
@@ -114,14 +106,14 @@ class captcha
* certain limits so as to keep it readable. It also varies the image
* width a little
*/
- function randomise($scanline, $width)
+ private static function randomise($scanline, $width)
{
$new_line = '';
- $end = strlen($scanline) - ceil($width/2);
- for ($i = floor($width/2); $i < $end; $i++)
+ $end = strlen($scanline) - ceil($width / 2);
+ for ($i = $width >> 1; $i < $end; $i++)
{
- $pixel = ord($scanline{$i});
+ $pixel = ord($scanline[$i]);
if ($pixel < 190)
{
@@ -144,7 +136,7 @@ class captcha
* This creates a chunk of the given type, with the given data
* of the given length adding the relevant crc
*/
- function png_chunk($length, $type, $data)
+ private static function png_chunk($length, $type, $data)
{
$raw = $type . $data;
@@ -165,7 +157,7 @@ class captcha
// IHDR
$raw = pack('N2', $width, $height);
$raw .= pack('C5', 8, 0, 0, 0, 0);
- $image .= $this->png_chunk(13, 'IHDR', $raw);
+ $image .= self::png_chunk(13, 'IHDR', $raw);
// IDAT
if (@extension_loaded('zlib'))
@@ -226,10 +218,10 @@ class captcha
}
// IDAT
- $image .= $this->png_chunk($length, 'IDAT', $raw_image);
+ $image .= self::png_chunk($length, 'IDAT', $raw_image);
// IEND
- $image .= $this->png_chunk(0, 'IEND', '');
+ $image .= self::png_chunk(0, 'IEND', '');
return $image;
}
@@ -238,7 +230,7 @@ class captcha
* png image data
* Each 'data' element is base64_encoded uncompressed IDAT
*/
- function define_filtered_pngs()
+ private static function define_filtered_pngs()
{
$this->filtered_pngs = array(
'0' => array(
diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php
index 0a65fc12ca..2e349df6ce 100644
--- a/phpBB/includes/db/db_tools.php
+++ b/phpBB/includes/db/db_tools.php
@@ -253,7 +253,7 @@ class phpbb_db_tools
/**
*/
- function phpbb_db_tools(&$db)
+ function __construct(&$db)
{
$this->db = $db;
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index e37ccda0db..a2a42e173c 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -66,7 +66,7 @@ class dbal
/**
* Constructor
*/
- function dbal()
+ function __construct()
{
$this->num_queries = array(
'cached' => 0,
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php
index d23d1866c1..b258b96fa1 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/includes/db/firebird.php
@@ -27,7 +27,6 @@ class dbal_firebird extends dbal
{
var $last_query_text = '';
var $service_handle = false;
- var $affected_rows = 0;
/**
* Connect to server
@@ -41,7 +40,7 @@ class dbal_firebird extends dbal
$this->db_connect_id = ($this->persistency) ? @ibase_pconnect($this->server . ':' . $this->dbname, $this->user, $sqlpassword, false, false, 3) : @ibase_connect($this->server . ':' . $this->dbname, $this->user, $sqlpassword, false, false, 3);
- $this->service_handle = (function_exists('ibase_service_attach')) ? @ibase_service_attach($this->server, $this->user, $sqlpassword) : false;
+ $this->service_handle = (strtolower($this->user) == 'sysdba') ? @ibase_service_attach($this->server, $this->user, $sqlpassword) : false;
return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
}
@@ -51,7 +50,7 @@ class dbal_firebird extends dbal
*/
function sql_server_info()
{
- if ($this->service_handle !== false && function_exists('ibase_server_info'))
+ if ($this->service_handle !== false)
{
return @ibase_server_info($this->service_handle, IBASE_SVC_SERVER_VERSION);
}
@@ -164,25 +163,6 @@ class dbal_firebird extends dbal
}
}
- if (!function_exists('ibase_affected_rows') && (preg_match('/^UPDATE ([\w_]++)\s+SET [\w_]++\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+)(?:,\s*[\w_]++\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+))*+\s+(WHERE.*)?$/s', $query, $regs) || preg_match('/^DELETE FROM ([\w_]++)\s*(WHERE\s*.*)?$/s', $query, $regs)))
- {
- $affected_sql = 'SELECT COUNT(*) as num_rows_affected FROM ' . $regs[1];
- if (!empty($regs[2]))
- {
- $affected_sql .= ' ' . $regs[2];
- }
-
- if (!($temp_q_id = @ibase_query($this->db_connect_id, $affected_sql)))
- {
- return false;
- }
-
- $temp_result = @ibase_fetch_assoc($temp_q_id);
- @ibase_free_result($temp_q_id);
-
- $this->affected_rows = ($temp_result) ? $temp_result['NUM_ROWS_AFFECTED'] : false;
- }
-
if (sizeof($array))
{
$p_query = @ibase_prepare($this->db_connect_id, $query);
@@ -207,15 +187,7 @@ class dbal_firebird extends dbal
if (!$this->transaction)
{
- if (function_exists('ibase_commit_ret'))
- {
- @ibase_commit_ret();
- }
- else
- {
- // way cooler than ibase_commit_ret :D
- @ibase_query('COMMIT RETAIN;');
- }
+ @ibase_commit_ret();
}
if ($cache_ttl && method_exists($cache, 'sql_save'))
@@ -258,15 +230,7 @@ class dbal_firebird extends dbal
*/
function sql_affectedrows()
{
- // PHP 5+ function
- if (function_exists('ibase_affected_rows'))
- {
- return ($this->db_connect_id) ? @ibase_affected_rows($this->db_connect_id) : false;
- }
- else
- {
- return $this->affected_rows;
- }
+ return ($this->db_connect_id) ? @ibase_affected_rows($this->db_connect_id) : false;
}
/**
@@ -438,7 +402,7 @@ class dbal_firebird extends dbal
{
return array(
'message' => @ibase_errmsg(),
- 'code' => (@function_exists('ibase_errcode') ? @ibase_errcode() : '')
+ 'code' => @ibase_errcode()
);
}
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php
index b222588cf2..1e42abcce2 100644
--- a/phpBB/includes/db/mssql.php
+++ b/phpBB/includes/db/mssql.php
@@ -39,14 +39,7 @@ class dbal_mssql extends dbal
@ini_set('mssql.textlimit', 2147483647);
@ini_set('mssql.textsize', 2147483647);
- if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.1', '>=')))
- {
- $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link);
- }
- else
- {
- $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword) : @mssql_connect($this->server, $this->user, $sqlpassword);
- }
+ $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link);
if ($this->db_connect_id && $this->dbname != '')
{
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php
index 2d689f86f9..840d40b03d 100644
--- a/phpBB/includes/db/mysql.php
+++ b/phpBB/includes/db/mysql.php
@@ -362,11 +362,12 @@ class dbal_mysql extends dbal
function _sql_report($mode, $query = '')
{
static $test_prof;
+ static $test_extend;
// current detection method, might just switch to see the existance of INFORMATION_SCHEMA.PROFILING
if ($test_prof === null)
{
- $test_prof = false;
+ $test_prof = $test_extend = false;
if (strpos($this->mysql_version, 'community') !== false)
{
$ver = substr($this->mysql_version, 0, strpos($this->mysql_version, '-'));
@@ -375,6 +376,11 @@ class dbal_mysql extends dbal
$test_prof = true;
}
}
+
+ if (version_compare($ver, '4.1.1', '>='))
+ {
+ $test_extend = true;
+ }
}
switch ($mode)
@@ -401,7 +407,7 @@ class dbal_mysql extends dbal
@mysql_query('SET profiling = 1;', $this->db_connect_id);
}
- if ($result = @mysql_query("EXPLAIN $explain_query", $this->db_connect_id))
+ if ($result = @mysql_query('EXPLAIN ' . (($test_extend) ? 'EXTENDED ' : '') . "$explain_query", $this->db_connect_id))
{
while ($row = @mysql_fetch_assoc($result))
{
@@ -415,6 +421,27 @@ class dbal_mysql extends dbal
$this->html_hold .= '</table>';
}
+ if ($test_extend)
+ {
+ $html_table = false;
+
+ if ($result = @mysql_query('SHOW WARNINGS', $this->db_connect_id))
+ {
+ $this->html_hold .= '<br />';
+ while ($row = @mysql_fetch_assoc($result))
+ {
+ $html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
+ }
+ }
+ @mysql_free_result($result);
+
+ if ($html_table)
+ {
+ $this->html_hold .= '</table>';
+ }
+ }
+
+
if ($test_prof)
{
$html_table = false;
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index a63c06e5c0..18740fb036 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -48,7 +48,7 @@ class dbal_oracle extends dbal
$connect = $sqlserver . (($port) ? ':' . $port : '') . '/' . $database;
}
- $this->db_connect_id = ($new_link) ? @ocinlogon($this->user, $sqlpassword, $connect, 'UTF8') : (($this->persistency) ? @ociplogon($this->user, $sqlpassword, $connect, 'UTF8') : @ocilogon($this->user, $sqlpassword, $connect, 'UTF8'));
+ $this->db_connect_id = ($new_link) ? @oci_new_connect($this->user, $sqlpassword, $connect, 'UTF8') : (($this->persistency) ? @oci_pconnect($this->user, $sqlpassword, $connect, 'UTF8') : @oci_connect($this->user, $sqlpassword, $connect, 'UTF8'));
return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
}
@@ -58,7 +58,7 @@ class dbal_oracle extends dbal
*/
function sql_server_info()
{
- return @ociserverversion($this->db_connect_id);
+ return @oci_server_version($this->db_connect_id);
}
/**
@@ -74,11 +74,11 @@ class dbal_oracle extends dbal
break;
case 'commit':
- return @ocicommit($this->db_connect_id);
+ return @oci_commit($this->db_connect_id);
break;
case 'rollback':
- return @ocirollback($this->db_connect_id);
+ return @oci_rollback($this->db_connect_id);
break;
}
@@ -308,14 +308,14 @@ class dbal_oracle extends dbal
break;
}
- $this->query_result = @ociparse($this->db_connect_id, $query);
+ $this->query_result = @oci_parse($this->db_connect_id, $query);
foreach ($array as $key => $value)
{
- @ocibindbyname($this->query_result, $key, $array[$key], -1);
+ @oci_bind_by_name($this->query_result, $key, $array[$key], -1);
}
- $success = @ociexecute($this->query_result, OCI_DEFAULT);
+ $success = @oci_execute($this->query_result, OCI_DEFAULT);
if (!$success)
{
@@ -375,7 +375,7 @@ class dbal_oracle extends dbal
*/
function sql_affectedrows()
{
- return ($this->query_result) ? @ocirowcount($this->query_result) : false;
+ return ($this->query_result) ? @oci_num_rows($this->query_result) : false;
}
/**
@@ -398,9 +398,9 @@ class dbal_oracle extends dbal
if ($query_id !== false)
{
$row = array();
- $result = @ocifetchinto($query_id, $row, OCI_ASSOC + OCI_RETURN_NULLS);
+ $row = @oci_fetch_array($query_id, OCI_ASSOC + OCI_RETURN_NULLS);
- if (!$result || !$row)
+ if (!$row)
{
return false;
}
@@ -453,7 +453,7 @@ class dbal_oracle extends dbal
}
// Reset internal pointer
- @ociexecute($query_id, OCI_DEFAULT);
+ @oci_execute($query_id, OCI_DEFAULT);
// We do not fetch the row for rownum == 0 because then the next resultset would be the second row
for ($i = 0; $i < $rownum; $i++)
@@ -479,13 +479,13 @@ class dbal_oracle extends dbal
if (preg_match('#^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)#is', $this->last_query_text, $tablename))
{
$query = 'SELECT ' . $tablename[1] . '_seq.currval FROM DUAL';
- $stmt = @ociparse($this->db_connect_id, $query);
- @ociexecute($stmt, OCI_DEFAULT);
+ $stmt = @oci_parse($this->db_connect_id, $query);
+ @oci_execute($stmt, OCI_DEFAULT);
- $temp_result = @ocifetchinto($stmt, $temp_array, OCI_ASSOC + OCI_RETURN_NULLS);
- @ocifreestatement($stmt);
+ $temp_array = @oci_fetch_array($stmt, OCI_ASSOC + OCI_RETURN_NULLS);
+ @oci_free_statement($stmt);
- if ($temp_result)
+ if ($temp_array)
{
return $temp_array['CURRVAL'];
}
@@ -519,7 +519,7 @@ class dbal_oracle extends dbal
if (isset($this->open_queries[(int) $query_id]))
{
unset($this->open_queries[(int) $query_id]);
- return @ocifreestatement($query_id);
+ return @oci_free_statement($query_id);
}
return false;
@@ -553,9 +553,9 @@ class dbal_oracle extends dbal
*/
function _sql_error()
{
- $error = @ocierror();
- $error = (!$error) ? @ocierror($this->query_result) : $error;
- $error = (!$error) ? @ocierror($this->db_connect_id) : $error;
+ $error = @oci_error();
+ $error = (!$error) ? @oci_error($this->query_result) : $error;
+ $error = (!$error) ? @oci_error($this->db_connect_id) : $error;
if ($error)
{
@@ -575,7 +575,7 @@ class dbal_oracle extends dbal
*/
function _sql_close()
{
- return @ocilogoff($this->db_connect_id);
+ return @oci_close($this->db_connect_id);
}
/**
@@ -594,11 +594,11 @@ class dbal_oracle extends dbal
$sql = "SELECT table_name
FROM USER_TABLES
WHERE table_name LIKE '%PLAN_TABLE%'";
- $stmt = ociparse($this->db_connect_id, $sql);
- ociexecute($stmt);
+ $stmt = oci_parse($this->db_connect_id, $sql);
+ oci_execute($stmt);
$result = array();
- if (ocifetchinto($stmt, $result, OCI_ASSOC + OCI_RETURN_NULLS))
+ if ($result = oci_fetch_array($stmt, OCI_ASSOC + OCI_RETURN_NULLS))
{
$table = $result['TABLE_NAME'];
@@ -606,17 +606,17 @@ class dbal_oracle extends dbal
$statement_id = substr(md5($query), 0, 30);
// Remove any stale plans
- $stmt2 = ociparse($this->db_connect_id, "DELETE FROM $table WHERE statement_id='$statement_id'");
- ociexecute($stmt2);
- ocifreestatement($stmt2);
+ $stmt2 = oci_parse($this->db_connect_id, "DELETE FROM $table WHERE statement_id='$statement_id'");
+ oci_execute($stmt2);
+ oci_free_statement($stmt2);
// Explain the plan
$sql = "EXPLAIN PLAN
SET STATEMENT_ID = '$statement_id'
FOR $query";
$stmt2 = ociparse($this->db_connect_id, $sql);
- ociexecute($stmt2);
- ocifreestatement($stmt2);
+ oci_execute($stmt2);
+ oci_free_statement($stmt2);
// Get the data from the plan
$sql = "SELECT operation, options, object_name, object_type, cardinality, cost
@@ -624,24 +624,24 @@ class dbal_oracle extends dbal
START WITH id = 0 AND statement_id = '$statement_id'
CONNECT BY PRIOR id = parent_id
AND statement_id = '$statement_id'";
- $stmt2 = ociparse($this->db_connect_id, $sql);
- ociexecute($stmt2);
+ $stmt2 = oci_parse($this->db_connect_id, $sql);
+ oci_execute($stmt2);
$row = array();
- while (ocifetchinto($stmt2, $row, OCI_ASSOC + OCI_RETURN_NULLS))
+ while ($row = oci_fetch_array($stmt2, OCI_ASSOC + OCI_RETURN_NULLS))
{
$html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
}
- ocifreestatement($stmt2);
+ oci_free_statement($stmt2);
// Remove the plan we just made, we delete them on request anyway
- $stmt2 = ociparse($this->db_connect_id, "DELETE FROM $table WHERE statement_id='$statement_id'");
- ociexecute($stmt2);
- ocifreestatement($stmt2);
+ $stmt2 = oci_parse($this->db_connect_id, "DELETE FROM $table WHERE statement_id='$statement_id'");
+ oci_execute($stmt2);
+ oci_free_statement($stmt2);
}
- ocifreestatement($stmt);
+ oci_free_statement($stmt);
if ($html_table)
{
@@ -654,15 +654,15 @@ class dbal_oracle extends dbal
$endtime = explode(' ', microtime());
$endtime = $endtime[0] + $endtime[1];
- $result = @ociparse($this->db_connect_id, $query);
- $success = @ociexecute($result, OCI_DEFAULT);
+ $result = @oci_parse($this->db_connect_id, $query);
+ $success = @oci_execute($result, OCI_DEFAULT);
$row = array();
- while (@ocifetchinto($result, $row, OCI_ASSOC + OCI_RETURN_NULLS))
+ while ($void = @oci_fetch_array($result, OCI_ASSOC + OCI_RETURN_NULLS))
{
// Take the time spent on parsing rows into account
}
- @ocifreestatement($result);
+ @oci_free_statement($result);
$splittime = explode(' ', microtime());
$splittime = $splittime[0] + $splittime[1];
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index bb689a7394..0ac27023f3 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -82,21 +82,7 @@ class dbal_postgres extends dbal
if ($this->db_connect_id)
{
// determine what version of PostgreSQL is running, we can be more efficient if they are running 8.2+
- if (version_compare(PHP_VERSION, '5.0.0', '>='))
- {
- $this->pgsql_version = @pg_parameter_status($this->db_connect_id, 'server_version');
- }
- else
- {
- $query_id = @pg_query($this->db_connect_id, 'SELECT VERSION()');
- $row = @pg_fetch_assoc($query_id, null);
- @pg_free_result($query_id);
-
- if (!empty($row['version']))
- {
- $this->pgsql_version = substr($row['version'], 10);
- }
- }
+ $this->pgsql_version = @pg_parameter_status($this->db_connect_id, 'server_version');
if (!empty($this->pgsql_version) && $this->pgsql_version[0] >= '8' && $this->pgsql_version[2] >= '2')
{
@@ -172,7 +158,7 @@ class dbal_postgres extends dbal
if ($this->query_result === false)
{
- if (($this->query_result = @pg_query($this->db_connect_id, $query)) === false)
+ if (($this->query_result = pg_query($this->db_connect_id, $query)) === false)
{
$this->sql_error($query);
}
diff --git a/phpBB/includes/diff/diff.php b/phpBB/includes/diff/diff.php
index 0b3d14dbda..801480df95 100644
--- a/phpBB/includes/diff/diff.php
+++ b/phpBB/includes/diff/diff.php
@@ -43,7 +43,7 @@ class diff
* @param array $from_lines An array of strings. Typically these are lines from a file.
* @param array $to_lines An array of strings.
*/
- function diff(&$from_content, &$to_content, $preserve_cr = true)
+ function __construct(&$from_content, &$to_content, $preserve_cr = true)
{
$diff_engine = &new diff_engine();
$this->_edits = $diff_engine->diff($from_content, $to_content, $preserve_cr);
@@ -645,7 +645,7 @@ class diff3 extends diff
*/
class diff3_op
{
- function diff3_op($orig = false, $final1 = false, $final2 = false)
+ function __construct($orig = false, $final1 = false, $final2 = false)
{
$this->orig = $orig ? $orig : array();
$this->final1 = $final1 ? $final1 : array();
@@ -717,7 +717,7 @@ class diff3_op_copy extends diff3_op
*/
class diff3_block_builder
{
- function diff3_block_builder()
+ function __construct()
{
$this->_init();
}
diff --git a/phpBB/includes/diff/renderer.php b/phpBB/includes/diff/renderer.php
index 4157bc2cde..11745dab3d 100644
--- a/phpBB/includes/diff/renderer.php
+++ b/phpBB/includes/diff/renderer.php
@@ -51,7 +51,7 @@ class diff_renderer
/**
* Constructor.
*/
- function diff_renderer($params = array())
+ function __construct($params = array())
{
foreach ($params as $param => $value)
{
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index bf00beb2e1..63a90ee9cc 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -323,7 +323,7 @@ function _hash_gensalt_private($input, &$itoa64, $iteration_count_log2 = 6)
}
$output = '$H$';
- $output .= $itoa64[min($iteration_count_log2 + ((PHP_VERSION >= 5) ? 5 : 3), 30)];
+ $output .= $itoa64[min($iteration_count_log2 + 5, 30)];
$output .= _hash_encode64($input, 6, $itoa64);
return $output;
@@ -409,24 +409,12 @@ function _hash_crypt_private($password, $setting, &$itoa64)
* consequently in lower iteration counts and hashes that are
* quicker to crack (by non-PHP code).
*/
- if (PHP_VERSION >= 5)
- {
- $hash = md5($salt . $password, true);
- do
- {
- $hash = md5($hash . $password, true);
- }
- while (--$count);
- }
- else
+ $hash = md5($salt . $password, true);
+ do
{
- $hash = pack('H*', md5($salt . $password));
- do
- {
- $hash = pack('H*', md5($hash . $password));
- }
- while (--$count);
+ $hash = md5($hash . $password, true);
}
+ while (--$count);
$output = substr($setting, 0, 12);
$output .= _hash_encode64($hash, 16, $itoa64);
@@ -434,95 +422,6 @@ function _hash_crypt_private($password, $setting, &$itoa64)
return $output;
}
-// Compatibility functions
-
-if (!function_exists('array_combine'))
-{
- /**
- * A wrapper for the PHP5 function array_combine()
- * @param array $keys contains keys for the resulting array
- * @param array $values contains values for the resulting array
- *
- * @return Returns an array by using the values from the keys array as keys and the
- * values from the values array as the corresponding values. Returns false if the
- * number of elements for each array isn't equal or if the arrays are empty.
- */
- function array_combine($keys, $values)
- {
- $keys = array_values($keys);
- $values = array_values($values);
-
- $n = sizeof($keys);
- $m = sizeof($values);
- if (!$n || !$m || ($n != $m))
- {
- return false;
- }
-
- $combined = array();
- for ($i = 0; $i < $n; $i++)
- {
- $combined[$keys[$i]] = $values[$i];
- }
- return $combined;
- }
-}
-
-if (!function_exists('str_split'))
-{
- /**
- * A wrapper for the PHP5 function str_split()
- * @param array $string contains the string to be converted
- * @param array $split_length contains the length of each chunk
- *
- * @return Converts a string to an array. If the optional split_length parameter is specified,
- * the returned array will be broken down into chunks with each being split_length in length,
- * otherwise each chunk will be one character in length. FALSE is returned if split_length is
- * less than 1. If the split_length length exceeds the length of string, the entire string is
- * returned as the first (and only) array element.
- */
- function str_split($string, $split_length = 1)
- {
- if ($split_length < 1)
- {
- return false;
- }
- else if ($split_length >= strlen($string))
- {
- return array($string);
- }
- else
- {
- preg_match_all('#.{1,' . $split_length . '}#s', $string, $matches);
- return $matches[0];
- }
- }
-}
-
-if (!function_exists('stripos'))
-{
- /**
- * A wrapper for the PHP5 function stripos
- * Find position of first occurrence of a case-insensitive string
- *
- * @param string $haystack is the string to search in
- * @param string $needle is the string to search for
- *
- * @return mixed Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive.
- * Note that the needle may be a string of one or more characters.
- * If needle is not found, stripos() will return boolean FALSE.
- */
- function stripos($haystack, $needle)
- {
- if (preg_match('#' . preg_quote($needle, '#') . '#i', $haystack, $m))
- {
- return strpos($haystack, $m[0]);
- }
-
- return false;
- }
-}
-
if (!function_exists('realpath'))
{
/**
@@ -713,18 +612,6 @@ else
}
}
-if (!function_exists('htmlspecialchars_decode'))
-{
- /**
- * A wrapper for htmlspecialchars_decode
- * @ignore
- */
- function htmlspecialchars_decode($string, $quote_style = ENT_COMPAT)
- {
- return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style)));
- }
-}
-
// functions used for building option fields
/**
@@ -3153,6 +3040,8 @@ function page_header($page_title = '', $display_online_list = true)
ORDER BY u.username_clean ASC, s.session_ip ASC';
$result = $db->sql_query($sql);
+ $prev_user_id = false;
+
while ($row = $db->sql_fetchrow($result))
{
// User is logged in and therefore not a guest
@@ -3355,6 +3244,9 @@ function page_header($page_title = '', $display_online_list = true)
'S_BOARD_DISABLED' => ($config['board_disable']) ? true : false,
'S_REGISTERED_USER' => $user->data['is_registered'],
'S_IS_BOT' => $user->data['is_bot'],
+ 'S_IN_SEARCH' => false,
+ 'S_VIEWTOPIC' => false,
+ 'S_VIEWFORUM' => false,
'S_USER_PM_POPUP' => $user->optionget('popuppm'),
'S_USER_LANG' => $user->lang['USER_LANG'],
'S_USER_BROWSER' => (isset($user->data['session_browser'])) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'],
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php
index 36b7d575d9..9537bd1ed1 100644
--- a/phpBB/includes/functions_compress.php
+++ b/phpBB/includes/functions_compress.php
@@ -22,12 +22,12 @@ if (!defined('IN_PHPBB'))
*/
class compress
{
- var $fp = 0;
+ protected $fp = 0;
/**
* Add file to archive
*/
- function add_file($src, $src_rm_prefix = '', $src_add_prefix = '', $skip_files = '')
+ public function add_file($src, $src_rm_prefix = '', $src_add_prefix = '', $skip_files = '')
{
global $phpbb_root_path;
@@ -87,7 +87,7 @@ class compress
/**
* Add custom file (the filepath will not be adjusted)
*/
- function add_custom_file($src, $filename)
+ public function add_custom_file($src, $filename)
{
$this->data($filename, file_get_contents($src), false, stat($src));
return true;
@@ -96,7 +96,7 @@ class compress
/**
* Add file data
*/
- function add_data($src, $name)
+ public function add_data($src, $name)
{
$stat = array();
$stat[2] = 436; //384
@@ -110,7 +110,7 @@ class compress
/**
* Return available methods
*/
- function methods()
+ public static function methods()
{
$methods = array('.tar');
$available_methods = array('.tar.gz' => 'zlib', '.tar.bz2' => 'bz2', '.zip' => 'zlib');
@@ -143,17 +143,17 @@ class compress
*/
class compress_zip extends compress
{
- var $datasec = array();
- var $ctrl_dir = array();
- var $eof_cdh = "\x50\x4b\x05\x06\x00\x00\x00\x00";
+ private $datasec = array();
+ private $ctrl_dir = array();
+ const eof_cdh = "\x50\x4b\x05\x06\x00\x00\x00\x00";
- var $old_offset = 0;
- var $datasec_len = 0;
+ private $old_offset = 0;
+ private $datasec_len = 0;
/**
* Constructor
*/
- function compress_zip($mode, $file)
+ function __construct($mode, $file)
{
return $this->fp = @fopen($file, $mode . 'b');
}
@@ -161,7 +161,7 @@ class compress_zip extends compress
/**
* Convert unix to dos time
*/
- function unix_to_dos_time($time)
+ private static function unix_to_dos_time($time)
{
$timearray = (!$time) ? getdate() : getdate($time);
@@ -178,7 +178,7 @@ class compress_zip extends compress
/**
* Extract archive
*/
- function extract($dst)
+ public function extract($dst)
{
// Loop the file, looking for files and folders
$dd_try = false;
@@ -313,7 +313,7 @@ class compress_zip extends compress
/**
* Close archive
*/
- function close()
+ public function close()
{
// Write out central file directory and footer ... if it exists
if (sizeof($this->ctrl_dir))
@@ -326,11 +326,11 @@ class compress_zip extends compress
/**
* Create the structures ... note we assume version made by is MSDOS
*/
- function data($name, $data, $is_dir = false, $stat)
+ protected function data($name, $data, $is_dir = false, $stat)
{
$name = str_replace('\\', '/', $name);
- $hexdtime = pack('V', $this->unix_to_dos_time($stat[9]));
+ $hexdtime = pack('V', self::unix_to_dos_time($stat[9]));
if ($is_dir)
{
@@ -412,11 +412,11 @@ class compress_zip extends compress
/**
* file
*/
- function file()
+ private function file()
{
$ctrldir = implode('', $this->ctrl_dir);
- return $ctrldir . $this->eof_cdh .
+ return $ctrldir . self::eof_cdh .
pack('v', sizeof($this->ctrl_dir)) . // total # of entries "on this disk"
pack('v', sizeof($this->ctrl_dir)) . // total # of entries overall
pack('V', strlen($ctrldir)) . // size of central dir
@@ -427,7 +427,7 @@ class compress_zip extends compress
/**
* Download archive
*/
- function download($filename, $download_name = false)
+ public function download($filename, $download_name = false)
{
global $phpbb_root_path;
@@ -462,17 +462,17 @@ class compress_zip extends compress
*/
class compress_tar extends compress
{
- var $isgz = false;
- var $isbz = false;
- var $filename = '';
- var $mode = '';
- var $type = '';
- var $wrote = false;
+ private $isgz = false;
+ private $isbz = false;
+ private $filename = '';
+ private $mode = '';
+ private $type = '';
+ private $wrote = false;
/**
* Constructor
*/
- function compress_tar($mode, $file, $type = '')
+ function __construct($mode, $file, $type = '')
{
$type = (!$type) ? $file : $type;
$this->isgz = (strpos($type, '.tar.gz') !== false || strpos($type, '.tgz') !== false) ? true : false;
@@ -487,7 +487,7 @@ class compress_tar extends compress
/**
* Extract archive
*/
- function extract($dst)
+ public function extract($dst)
{
$fzread = ($this->isbz && function_exists('bzread')) ? 'bzread' : (($this->isgz && @extension_loaded('zlib')) ? 'gzread' : 'fread');
@@ -549,7 +549,7 @@ class compress_tar extends compress
/**
* Close archive
*/
- function close()
+ public function close()
{
$fzclose = ($this->isbz && function_exists('bzclose')) ? 'bzclose' : (($this->isgz && @extension_loaded('zlib')) ? 'gzclose' : 'fclose');
@@ -567,7 +567,7 @@ class compress_tar extends compress
/**
* Create the structures
*/
- function data($name, $data, $is_dir = false, $stat)
+ protected function data($name, $data, $is_dir = false, $stat)
{
$this->wrote = true;
$fzwrite = ($this->isbz && function_exists('bzwrite')) ? 'bzwrite' : (($this->isgz && @extension_loaded('zlib')) ? 'gzwrite' : 'fwrite');
@@ -613,7 +613,7 @@ class compress_tar extends compress
/**
* Open archive
*/
- function open()
+ private function open()
{
$fzopen = ($this->isbz && function_exists('bzopen')) ? 'bzopen' : (($this->isgz && @extension_loaded('zlib')) ? 'gzopen' : 'fopen');
$this->fp = @$fzopen($this->file, $this->mode . (($fzopen == 'bzopen') ? '' : 'b') . (($fzopen == 'gzopen') ? '9' : ''));
@@ -627,7 +627,7 @@ class compress_tar extends compress
/**
* Download archive
*/
- function download($filename, $download_name = false)
+ public function download($filename, $download_name = false)
{
global $phpbb_root_path;
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index c0acd2eb41..b601e3a60c 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -660,7 +660,7 @@ function censor_text($text)
}
else
{
- $censors = $cache->obtain_word_list();
+ $censors = cache::obtain_word_list();
}
}
@@ -722,6 +722,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
//
$compiled_attachments = array();
+ // @todo: do we really need this check?
if (!isset($template->filename['attachment_tpl']))
{
$template->set_filenames(array(
@@ -731,7 +732,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
if (empty($extensions) || !is_array($extensions))
{
- $extensions = $cache->obtain_attach_extensions($forum_id);
+ $extensions = cache::obtain_attach_extensions($forum_id);
}
// Look for missing attachment information...
@@ -1046,7 +1047,7 @@ function extension_allowed($forum_id, $extension, &$extensions)
if (empty($extensions))
{
global $cache;
- $extensions = $cache->obtain_attach_extensions($forum_id);
+ $extensions = cache::obtain_attach_extensions($forum_id);
}
return (!isset($extensions['_allowed_'][$extension])) ? false : true;
@@ -1187,7 +1188,7 @@ class bitfield
{
var $data;
- function bitfield($bitfield = '')
+ function __construct($bitfield = '')
{
$this->data = base64_decode($bitfield);
}
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 05630342d1..a9b037787c 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -1106,7 +1106,7 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
if (empty($ranks))
{
global $cache;
- $ranks = $cache->obtain_ranks();
+ $ranks = cache::obtain_ranks();
}
if (!empty($user_rank))
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index f43ef7c5c7..129b516e8c 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -362,7 +362,7 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
case 'firebird':
// check the version of FB, use some hackery if we can't get access to the server info
- if ($db->service_handle !== false && function_exists('ibase_server_info'))
+ if ($db->service_handle !== false && strtolower($dbuser) == 'sysdba')
{
$val = @ibase_server_info($db->service_handle, IBASE_SVC_SERVER_VERSION);
preg_match('#V([\d.]+)#', $val, $match);
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index 8575f339c1..e8bd3d423e 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -30,31 +30,31 @@ if (!defined('IN_PHPBB'))
*/
class jabber
{
- var $connection = null;
- var $session = array();
- var $timeout = 10;
+ private $connection = null;
+ private $session = array();
+ private $timeout = 10;
- var $server;
- var $port;
- var $username;
- var $password;
- var $use_ssl;
- var $resource = 'functions_jabber.phpbb.php';
+ private $server;
+ private $port;
+ private $username;
+ private $password;
+ private $use_ssl;
+ private $resource = 'functions_jabber.phpbb.php';
- var $enable_logging;
- var $log_array;
+ private $enable_logging;
+ private $log_array;
- var $features = array();
+ private $features = array();
/**
*/
- function jabber($server, $port, $username, $password, $use_ssl = false)
+ function __construct($server, $port, $username, $password, $use_ssl = false)
{
$this->server = ($server) ? $server : 'localhost';
$this->port = ($port) ? $port : 5222;
$this->username = $username;
$this->password = $password;
- $this->use_ssl = ($use_ssl && $this->can_use_ssl()) ? true : false;
+ $this->use_ssl = ($use_ssl && self::can_use_ssl()) ? true : false;
// Change port if we use SSL
if ($this->port == 5222 && $this->use_ssl)
@@ -69,7 +69,7 @@ class jabber
/**
* Able to use the SSL functionality?
*/
- function can_use_ssl()
+ public static function can_use_ssl()
{
// Will not work with PHP >= 5.2.1 or < 5.2.3RC2 until timeout problem with ssl hasn't been fixed (http://bugs.php.net/41236)
return ((version_compare(PHP_VERSION, '5.2.1', '<') || version_compare(PHP_VERSION, '5.2.3RC2', '>=')) && @extension_loaded('openssl')) ? true : false;
@@ -78,7 +78,7 @@ class jabber
/**
* Able to use TLS?
*/
- function can_use_tls()
+ public static function can_use_tls()
{
if (!@extension_loaded('openssl') || !function_exists('stream_socket_enable_crypto') || !function_exists('stream_get_meta_data') || !function_exists('socket_set_blocking') || !function_exists('stream_get_wrappers'))
{
@@ -105,7 +105,7 @@ class jabber
* @param string $name
* @access public
*/
- function set_resource($name)
+ public function set_resource($name)
{
$this->resource = $name;
}
@@ -113,7 +113,7 @@ class jabber
/**
* Connect
*/
- function connect()
+ public function connect()
{
/* if (!$this->check_jid($this->username . '@' . $this->server))
{
@@ -142,7 +142,7 @@ class jabber
/**
* Disconnect
*/
- function disconnect()
+ public function disconnect()
{
if ($this->connected())
{
@@ -163,7 +163,7 @@ class jabber
/**
* Connected?
*/
- function connected()
+ public function connected()
{
return (is_resource($this->connection) && !feof($this->connection)) ? true : false;
}
@@ -174,7 +174,7 @@ class jabber
* @access public
* @return bool
*/
- function login()
+ public function login()
{
if (!sizeof($this->features))
{
@@ -188,10 +188,10 @@ class jabber
/**
* Send data to the Jabber server
* @param string $xml
- * @access public
+ * @access private
* @return bool
*/
- function send($xml)
+ private function send($xml)
{
if ($this->connected())
{
@@ -211,10 +211,10 @@ class jabber
* @param string $server host to connect to
* @param int $port port number
* @param bool $use_ssl use ssl or not
- * @access public
+ * @access private
* @return bool
*/
- function open_socket($server, $port, $use_ssl = false)
+ private function open_socket($server, $port, $use_ssl = false)
{
if (@function_exists('dns_get_record'))
{
@@ -243,7 +243,7 @@ class jabber
/**
* Return log
*/
- function get_log()
+ public function get_log()
{
if ($this->enable_logging && sizeof($this->log_array))
{
@@ -256,7 +256,7 @@ class jabber
/**
* Add information to log
*/
- function add_to_log($string)
+ private function add_to_log($string)
{
if ($this->enable_logging)
{
@@ -267,10 +267,10 @@ class jabber
/**
* Listens to the connection until it gets data or the timeout is reached.
* Thus, it should only be called if data is expected to be received.
- * @access public
+ * @access private
* @return mixed either false for timeout or an array with the received data
*/
- function listen($timeout = 10, $wait = false)
+ private function listen($timeout = 10, $wait = false)
{
if (!$this->connected())
{
@@ -291,7 +291,7 @@ class jabber
if ($data != '')
{
$this->add_to_log('RECV: '. $data);
- return $this->xmlize($data);
+ return self::xmlize($data);
}
else
{
@@ -302,10 +302,10 @@ class jabber
/**
* Initiates account registration (based on data used for contructor)
- * @access public
+ * @access private
* @return bool
*/
- function register()
+ private function register()
{
if (!isset($this->session['id']) || isset($this->session['jid']))
{
@@ -322,10 +322,10 @@ class jabber
* @param $message online, offline...
* @param $type dnd, away, chat, xa or nothing
* @param $unavailable set this to true if you want to become unavailable
- * @access public
+ * @access private
* @return bool
*/
- function send_presence($message = '', $type = '', $unavailable = false)
+ private function send_presence($message = '', $type = '', $unavailable = false)
{
if (!isset($this->session['jid']))
{
@@ -347,10 +347,10 @@ class jabber
/**
* This handles all the different XML elements
* @param array $xml
- * @access public
+ * @access private
* @return bool
*/
- function response($xml)
+ private function response($xml)
{
if (!is_array($xml) || !sizeof($xml))
{
@@ -420,7 +420,7 @@ class jabber
}
// Let's use TLS if SSL is not enabled and we can actually use it
- if (!$this->session['ssl'] && $this->can_use_tls() && $this->can_use_ssl() && isset($xml['stream:features'][0]['#']['starttls']))
+ if (!$this->session['ssl'] && self::can_use_tls() && self::can_use_ssl() && isset($xml['stream:features'][0]['#']['starttls']))
{
$this->add_to_log('Switching to TLS.');
$this->send("<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>\n");
@@ -483,7 +483,7 @@ class jabber
case 'challenge':
// continue with authentication...a challenge literally -_-
$decoded = base64_decode($xml['challenge'][0]['#']);
- $decoded = $this->parse_data($decoded);
+ $decoded = self::parse_data($decoded);
if (!isset($decoded['digest-uri']))
{
@@ -656,7 +656,7 @@ class jabber
}
}
- function send_message($to, $text, $subject = '', $type = 'normal')
+ public function send_message($to, $text, $subject = '', $type = 'normal')
{
if (!isset($this->session['jid']))
{
@@ -681,7 +681,7 @@ class jabber
* @access public
* @return string
*/
- function encrypt_password($data)
+ public function encrypt_password($data)
{
// let's me think about <challenge> again...
foreach (array('realm', 'cnonce', 'digest-uri') as $key)
@@ -712,10 +712,10 @@ class jabber
/**
* parse_data like a="b",c="d",... or like a="a, b", c, d="e", f=g,...
* @param string $data
- * @access public
+ * @access private
* @return array a => b ...
*/
- function parse_data($data)
+ private static function parse_data($data)
{
$data = explode(',', $data);
$pairs = array();
@@ -744,10 +744,10 @@ class jabber
/**
* opposite of jabber::parse_data()
* @param array $data
- * @access public
+ * @access private
* @return string
*/
- function implode_data($data)
+ private function implode_data($data)
{
$return = array();
foreach ($data as $key => $value)
@@ -762,7 +762,7 @@ class jabber
* @author Hans Anderson
* @copyright Hans Anderson / http://www.hansanderson.com/php/xml/
*/
- function xmlize($data, $skip_white = 1, $encoding = 'UTF-8')
+ private static function xmlize($data, $skip_white = 1, $encoding = 'UTF-8')
{
$data = trim($data);
@@ -783,7 +783,7 @@ class jabber
$tagname = $vals[$i]['tag'];
$array[$tagname][0]['@'] = (isset($vals[$i]['attributes'])) ? $vals[$i]['attributes'] : array();
- $array[$tagname][0]['#'] = $this->_xml_depth($vals, $i);
+ $array[$tagname][0]['#'] = self::_xml_depth($vals, $i);
if (substr($data, 0, 5) != '<?xml')
{
@@ -798,7 +798,7 @@ class jabber
* @author Hans Anderson
* @copyright Hans Anderson / http://www.hansanderson.com/php/xml/
*/
- function _xml_depth($vals, &$i)
+ private static function _xml_depth($vals, &$i)
{
$children = array();
@@ -821,7 +821,7 @@ class jabber
$children[$tagname][$size]['@'] = $vals[$i]['attributes'];
}
- $children[$tagname][$size]['#'] = $this->_xml_depth($vals, $i);
+ $children[$tagname][$size]['#'] = self::_xml_depth($vals, $i);
break;
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index be78ad2999..8aba4ed255 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -22,17 +22,17 @@ if (!defined('IN_PHPBB'))
*/
class messenger
{
- var $vars, $msg, $extra_headers, $replyto, $from, $subject;
- var $addresses = array();
+ private $vars, $msg, $extra_headers, $replyto, $from, $subject;
+ private $addresses = array();
- var $mail_priority = MAIL_NORMAL_PRIORITY;
- var $use_queue = true;
- var $tpl_msg = array();
+ private $mail_priority = MAIL_NORMAL_PRIORITY;
+ private $use_queue = true;
+ private $tpl_msg = array();
/**
* Constructor
*/
- function messenger($use_queue = true)
+ function __construct($use_queue = true)
{
global $config;
@@ -43,7 +43,7 @@ class messenger
/**
* Resets all the data (address, template file, etc etc) to default
*/
- function reset()
+ private function reset()
{
$this->addresses = $this->extra_headers = array();
$this->vars = $this->msg = $this->replyto = $this->from = '';
@@ -254,7 +254,7 @@ class messenger
/**
* Add error message to log
*/
- function error($type, $msg)
+ public static function error($type, $msg)
{
global $user, $phpEx, $phpbb_root_path, $config;
@@ -299,7 +299,7 @@ class messenger
/**
* Return email header
*/
- function build_header($to, $cc, $bcc)
+ private function build_header($to, $cc, $bcc)
{
global $config;
@@ -346,7 +346,7 @@ class messenger
/**
* Send out emails
*/
- function msg_email()
+ private function msg_email()
{
global $config, $user;
@@ -413,7 +413,7 @@ class messenger
if (!$result)
{
- $this->error('EMAIL', $err_msg);
+ self::error('EMAIL', $err_msg);
return false;
}
}
@@ -434,7 +434,7 @@ class messenger
/**
* Send jabber message out
*/
- function msg_jabber()
+ private function msg_jabber()
{
global $config, $db, $user, $phpbb_root_path, $phpEx;
@@ -468,13 +468,13 @@ class messenger
if (!$this->jabber->connect())
{
- $this->error('JABBER', $user->lang['ERR_JAB_CONNECT'] . '<br />' . $this->jabber->get_log());
+ self::error('JABBER', $user->lang['ERR_JAB_CONNECT'] . '<br />' . $this->jabber->get_log());
return false;
}
if (!$this->jabber->login())
{
- $this->error('JABBER', $user->lang['ERR_JAB_AUTH'] . '<br />' . $this->jabber->get_log());
+ self::error('JABBER', $user->lang['ERR_JAB_AUTH'] . '<br />' . $this->jabber->get_log());
return false;
}
@@ -504,15 +504,15 @@ class messenger
*/
class queue
{
- var $data = array();
- var $queue_data = array();
- var $package_size = 0;
- var $cache_file = '';
+ private $data = array();
+ private $queue_data = array();
+ private $package_size = 0;
+ private $cache_file = '';
/**
* constructor
*/
- function queue()
+ function __construct()
{
global $phpEx, $phpbb_root_path;
@@ -523,7 +523,7 @@ class queue
/**
* Init a queue object
*/
- function init($object, $package_size)
+ public function init($object, $package_size)
{
$this->data[$object] = array();
$this->data[$object]['package_size'] = $package_size;
@@ -533,7 +533,7 @@ class queue
/**
* Put object in queue
*/
- function put($object, $scope)
+ public function put($object, $scope)
{
$this->data[$object]['data'][] = $scope;
}
@@ -542,7 +542,7 @@ class queue
* Process queue
* Using lock file
*/
- function process()
+ public function process()
{
global $db, $config, $phpEx, $phpbb_root_path, $user;
@@ -707,7 +707,7 @@ class queue
/**
* Save queue
*/
- function save()
+ public function save()
{
if (!sizeof($this->data))
{
@@ -963,16 +963,16 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '')
*/
class smtp_class
{
- var $server_response = '';
- var $socket = 0;
- var $responses = array();
- var $commands = array();
- var $numeric_response_code = 0;
+ private $server_response = '';
+ public $socket = 0;
+ private $responses = array();
+ private $commands = array();
+ public $numeric_response_code = 0;
- var $backtrace = false;
- var $backtrace_log = array();
+ private $backtrace = false;
+ private $backtrace_log = array();
- function smtp_class()
+ function __construct()
{
// Always create a backtrace for admins to identify SMTP problems
$this->backtrace = true;
@@ -982,7 +982,7 @@ class smtp_class
/**
* Add backtrace message for debugging
*/
- function add_backtrace($message)
+ public function add_backtrace($message)
{
if ($this->backtrace)
{
@@ -993,7 +993,7 @@ class smtp_class
/**
* Send command to smtp server
*/
- function server_send($command, $private_info = false)
+ public function server_send($command, $private_info = false)
{
fputs($this->socket, $command . "\r\n");
@@ -1005,7 +1005,7 @@ class smtp_class
/**
* We use the line to give the support people an indication at which command the error occurred
*/
- function server_parse($response, $line)
+ public function server_parse($response, $line)
{
global $user;
@@ -1037,7 +1037,7 @@ class smtp_class
/**
* Close session
*/
- function close_session(&$err_msg)
+ public function close_session(&$err_msg)
{
fclose($this->socket);
@@ -1051,7 +1051,7 @@ class smtp_class
/**
* Log into server and get possible auth codes if neccessary
*/
- function log_into_server($hostname, $username, $password, $default_auth_method)
+ public function log_into_server($hostname, $username, $password, $default_auth_method)
{
global $user;
@@ -1171,7 +1171,7 @@ class smtp_class
/**
* Pop before smtp authentication
*/
- function pop_before_smtp($hostname, $username, $password)
+ private function pop_before_smtp($hostname, $username, $password)
{
global $user;
@@ -1206,7 +1206,7 @@ class smtp_class
/**
* Plain authentication method
*/
- function plain($username, $password)
+ private function plain($username, $password)
{
$this->server_send('AUTH PLAIN');
if ($err_msg = $this->server_parse('334', __LINE__))
@@ -1227,7 +1227,7 @@ class smtp_class
/**
* Login authentication method
*/
- function login($username, $password)
+ private function login($username, $password)
{
$this->server_send('AUTH LOGIN');
if ($err_msg = $this->server_parse('334', __LINE__))
@@ -1253,7 +1253,7 @@ class smtp_class
/**
* cram_md5 authentication method
*/
- function cram_md5($username, $password)
+ private function cram_md5($username, $password)
{
$this->server_send('AUTH CRAM-MD5');
if ($err_msg = $this->server_parse('334', __LINE__))
@@ -1280,7 +1280,7 @@ class smtp_class
* digest_md5 authentication method
* A real pain in the ***
*/
- function digest_md5($username, $password)
+ private function digest_md5($username, $password)
{
global $config, $user;
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 9ed2d78cb7..020ba0e0e3 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -249,7 +249,7 @@ function posting_gen_topic_icons($mode, $icon_id)
global $phpbb_root_path, $config, $template, $cache;
// Grab icons
- $icons = $cache->obtain_icons();
+ $icons = cache::obtain_icons();
if (!$icon_id)
{
@@ -373,7 +373,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
return $filedata;
}
- $extensions = $cache->obtain_attach_extensions((($is_message) ? false : (int) $forum_id));
+ $extensions = cache::obtain_attach_extensions((($is_message) ? false : (int) $forum_id));
$upload->set_allowed_extensions(array_keys($extensions['_allowed_']));
$file = ($local) ? $upload->local_upload($local_storage, $local_filedata) : $upload->form_upload($form_name);
@@ -991,7 +991,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$extensions = $attachments = array();
if ($has_attachments && $auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id))
{
- $extensions = $cache->obtain_attach_extensions($forum_id);
+ $extensions = cache::obtain_attach_extensions($forum_id);
// Get attachments...
$sql = 'SELECT *
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 63b506c5b8..d3b8a58915 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -22,16 +22,16 @@ if (!defined('IN_PHPBB'))
*/
class custom_profile
{
- var $profile_types = array(FIELD_INT => 'int', FIELD_STRING => 'string', FIELD_TEXT => 'text', FIELD_BOOL => 'bool', FIELD_DROPDOWN => 'dropdown', FIELD_DATE => 'date');
- var $profile_cache = array();
- var $options_lang = array();
+ const profile_types = array(FIELD_INT => 'int', FIELD_STRING => 'string', FIELD_TEXT => 'text', FIELD_BOOL => 'bool', FIELD_DROPDOWN => 'dropdown', FIELD_DATE => 'date');
+ private $profile_cache = array();
+ private $options_lang = array();
/**
* Assign editable fields to template, mode can be profile (for profile change) or register (for registration)
* Called by ucp_profile and ucp_register
* @access public
*/
- function generate_profile_fields($mode, $lang_id)
+ public function generate_profile_fields($mode, $lang_id)
{
global $db, $template, $auth;
@@ -88,7 +88,7 @@ class custom_profile
* Validate entered profile field data
* @access public
*/
- function validate_profile_field($field_type, &$field_value, $field_data)
+ public function validate_profile_field($field_type, &$field_value, $field_data)
{
switch ($field_type)
{
@@ -200,7 +200,7 @@ class custom_profile
* Build profile cache, used for display
* @access private
*/
- function build_cache()
+ private function build_cache()
{
global $db, $user, $auth;
@@ -227,14 +227,15 @@ class custom_profile
/**
* Get language entries for options and store them here for later use
*/
- function get_option_lang($field_id, $lang_id, $field_type, $preview)
+ private function get_option_lang($field_id, $lang_id, $field_type, $preview)
{
global $db;
if ($preview)
{
$lang_options = (!is_array($this->vars['lang_options'])) ? explode("\n", $this->vars['lang_options']) : $this->vars['lang_options'];
-
+
+ // @todo: ref optimize
foreach ($lang_options as $num => $var)
{
$this->options_lang[$field_id][$lang_id][($num + 1)] = $var;
@@ -250,6 +251,7 @@ class custom_profile
ORDER BY option_id";
$result = $db->sql_query($sql);
+ // @todo: ref optimize
while ($row = $db->sql_fetchrow($result))
{
$this->options_lang[$field_id][$lang_id][($row['option_id'] + 1)] = $row['lang_value'];
@@ -262,7 +264,7 @@ class custom_profile
* Submit profile field
* @access public
*/
- function submit_cp_field($mode, $lang_id, &$cp_data, &$cp_error)
+ public function submit_cp_field($mode, $lang_id, &$cp_data, &$cp_error)
{
global $auth, $db, $user;
@@ -354,7 +356,7 @@ class custom_profile
* This is directly connected to the user -> mode == grab is to grab the user specific fields, mode == show is for assigning the row to the template
* @access public
*/
- function generate_profile_fields_template($mode, $user_id = 0, $profile_row = false)
+ public function generate_profile_fields_template($mode, $user_id = 0, $profile_row = false)
{
global $db;
@@ -446,12 +448,12 @@ class custom_profile
/**
* Get Profile Value for display
*/
- function get_profile_value($ident_ary)
+ private function get_profile_value($ident_ary)
{
$value = $ident_ary['value'];
$field_type = $ident_ary['data']['field_type'];
- switch ($this->profile_types[$field_type])
+ switch (self::profile_types[$field_type])
{
case 'int':
if ($value == '')
@@ -550,7 +552,7 @@ class custom_profile
* Get field value for registration/profile
* @access private
*/
- function get_var($field_validation, &$profile_row, $default_value, $preview)
+ private function get_var($field_validation, &$profile_row, $default_value, $preview)
{
global $user;
@@ -609,19 +611,19 @@ class custom_profile
* Process int-type
* @access private
*/
- function generate_int($profile_row, $preview = false)
+ private function generate_int($profile_row, $preview = false)
{
global $template;
$profile_row['field_value'] = $this->get_var('int', $profile_row, $profile_row['field_default_value'], $preview);
- $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
+ $template->assign_block_vars(self::profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
}
/**
* Process date-type
* @access private
*/
- function generate_date($profile_row, $preview = false)
+ private function generate_date($profile_row, $preview = false)
{
global $user, $template;
@@ -673,21 +675,21 @@ class custom_profile
unset($now);
$profile_row['field_value'] = 0;
- $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
+ $template->assign_block_vars(self::profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
}
/**
* Process bool-type
* @access private
*/
- function generate_bool($profile_row, $preview = false)
+ private function generate_bool($profile_row, $preview = false)
{
global $template;
$value = $this->get_var('int', $profile_row, $profile_row['field_default_value'], $preview);
$profile_row['field_value'] = $value;
- $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
+ $template->assign_block_vars(self::profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
if ($profile_row['field_length'] == 1)
{
@@ -711,19 +713,19 @@ class custom_profile
* Process string-type
* @access private
*/
- function generate_string($profile_row, $preview = false)
+ private function generate_string($profile_row, $preview = false)
{
global $template;
$profile_row['field_value'] = $this->get_var('string', $profile_row, $profile_row['lang_default_value'], $preview);
- $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
+ $template->assign_block_vars(self::profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
}
/**
* Process text-type
* @access private
*/
- function generate_text($profile_row, $preview = false)
+ private function generate_text($profile_row, $preview = false)
{
global $template;
global $user, $phpEx, $phpbb_root_path;
@@ -733,14 +735,14 @@ class custom_profile
$profile_row['field_cols'] = $field_length[1];
$profile_row['field_value'] = $this->get_var('string', $profile_row, $profile_row['lang_default_value'], $preview);
- $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
+ $template->assign_block_vars(self::profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
}
/**
* Process dropdown-type
* @access private
*/
- function generate_dropdown($profile_row, $preview = false)
+ private function generate_dropdown($profile_row, $preview = false)
{
global $user, $template;
@@ -752,7 +754,7 @@ class custom_profile
}
$profile_row['field_value'] = $value;
- $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
+ $template->assign_block_vars(self::profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
foreach ($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']] as $option_id => $option_value)
{
@@ -769,7 +771,7 @@ class custom_profile
* change == user is able to set/enter profile values; preview == just show the value
* @access private
*/
- function process_field_row($mode, $profile_row)
+ private function process_field_row($mode, $profile_row)
{
global $template;
@@ -781,13 +783,13 @@ class custom_profile
);
// empty previously filled blockvars
- foreach ($this->profile_types as $field_case => $field_type)
+ foreach (self::profile_types as $field_case => $field_type)
{
$template->destroy_block_vars($field_type);
}
// Assign template variables
- $type_func = 'generate_' . $this->profile_types[$profile_row['field_type']];
+ $type_func = 'generate_' . self::profile_types[$profile_row['field_type']];
$this->$type_func($profile_row, $preview);
// Return templated data
@@ -797,7 +799,7 @@ class custom_profile
/**
* Build Array for user insertion into custom profile fields table
*/
- function build_insert_sql_array($cp_data)
+ public static function build_insert_sql_array($cp_data)
{
global $db, $user, $auth;
@@ -833,7 +835,7 @@ class custom_profile
* Get profile field value on submit
* @access private
*/
- function get_profile_field($profile_row)
+ private function get_profile_field($profile_row)
{
global $phpbb_root_path, $phpEx;
global $config;
@@ -906,12 +908,12 @@ class custom_profile
*/
class custom_profile_admin extends custom_profile
{
- var $vars = array();
+ public $vars = array();
/**
* Return possible validation options
*/
- function validate_options()
+ public function validate_options()
{
global $user;
@@ -930,7 +932,7 @@ class custom_profile_admin extends custom_profile
/**
* Get string options for second step in ACP
*/
- function get_string_options()
+ public function get_string_options()
{
global $user;
@@ -947,7 +949,7 @@ class custom_profile_admin extends custom_profile
/**
* Get text options for second step in ACP
*/
- function get_text_options()
+ public function get_text_options()
{
global $user;
@@ -964,7 +966,7 @@ class custom_profile_admin extends custom_profile
/**
* Get int options for second step in ACP
*/
- function get_int_options()
+ public function get_int_options()
{
global $user;
@@ -981,7 +983,7 @@ class custom_profile_admin extends custom_profile
/**
* Get bool options for second step in ACP
*/
- function get_bool_options()
+ public function get_bool_options()
{
global $user, $config, $lang_defs;
@@ -1011,7 +1013,7 @@ class custom_profile_admin extends custom_profile
/**
* Get dropdown options for second step in ACP
*/
- function get_dropdown_options()
+ public function get_dropdown_options()
{
global $user, $config, $lang_defs;
@@ -1045,7 +1047,7 @@ class custom_profile_admin extends custom_profile
/**
* Get date options for second step in ACP
*/
- function get_date_options()
+ public function get_date_options()
{
global $user, $config, $lang_defs;
diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php
index 17d3328427..5ff04b9826 100644
--- a/phpBB/includes/functions_template.php
+++ b/phpBB/includes/functions_template.php
@@ -37,16 +37,16 @@ if (!defined('IN_PHPBB'))
*/
class template_compile
{
- var $template;
+ private $template;
// Various storage arrays
- var $block_names = array();
- var $block_else_level = array();
+ private $block_names = array();
+ private $block_else_level = array();
/**
* constuctor
*/
- function template_compile(&$template)
+ function __construct(template &$template)
{
$this->template = &$template;
}
@@ -55,7 +55,7 @@ class template_compile
* Load template source from file
* @access private
*/
- function _tpl_load_file($handle, $store_in_db = false)
+ public function _tpl_load_file($handle, $store_in_db = false)
{
// Try and open template for read
if (!file_exists($this->template->files[$handle]))
@@ -91,7 +91,7 @@ class template_compile
* the ones that exist in zend_language_scanner.l
* @access private
*/
- function remove_php_tags(&$code)
+ private function remove_php_tags(&$code)
{
// This matches the information gathered from the internal PHP lexer
$match = array(
@@ -107,7 +107,7 @@ class template_compile
* The all seeing all doing compile method. Parts are inspired by or directly from Smarty
* @access private
*/
- function compile($code, $no_echo = false, $echo_var = '')
+ public function compile($code, $no_echo = false, $echo_var = '')
{
global $config;
@@ -232,7 +232,7 @@ class template_compile
* Compile variables
* @access private
*/
- function compile_var_tags(&$text_blocks)
+ private function compile_var_tags(&$text_blocks)
{
// change template varrefs into PHP varrefs
$varrefs = array();
@@ -274,7 +274,7 @@ class template_compile
* Compile blocks
* @access private
*/
- function compile_tag_block($tag_args)
+ private function compile_tag_block($tag_args)
{
$no_nesting = false;
@@ -379,7 +379,7 @@ class template_compile
* some adaptions for our block level methods
* @access private
*/
- function compile_tag_if($tag_args, $elseif)
+ private function compile_tag_if($tag_args, $elseif)
{
// Tokenize args for 'if' tag.
preg_match_all('/(?:
@@ -527,7 +527,7 @@ class template_compile
* Compile DEFINE tags
* @access private
*/
- function compile_tag_define($tag_args, $op)
+ private function compile_tag_define($tag_args, $op)
{
preg_match('#^((?:[a-z0-9\-_]+\.)+)?\$(?=[A-Z])([A-Z0-9_\-]*)(?: = (\'?)([^\']*)(\'?))?$#', $tag_args, $match);
@@ -580,7 +580,7 @@ class template_compile
* Compile INCLUDE tag
* @access private
*/
- function compile_tag_include($tag_args)
+ private function compile_tag_include($tag_args)
{
return "\$this->_tpl_include('$tag_args');";
}
@@ -589,7 +589,7 @@ class template_compile
* Compile INCLUDE_PHP tag
* @access private
*/
- function compile_tag_include_php($tag_args)
+ private function compile_tag_include_php($tag_args)
{
return "include('" . $tag_args . "');";
}
@@ -599,7 +599,7 @@ class template_compile
* This is from Smarty
* @access private
*/
- function _parse_is_expr($is_arg, $tokens)
+ private function _parse_is_expr($is_arg, array $tokens)
{
$expr_end = 0;
$negate_expr = false;
@@ -670,7 +670,7 @@ class template_compile
* NOTE: expects a trailing "." on the namespace.
* @access private
*/
- function generate_block_varref($namespace, $varname, $echo = true, $defop = false)
+ private function generate_block_varref($namespace, $varname, $echo = true, $defop = false)
{
// Strip the trailing period.
$namespace = substr($namespace, 0, -1);
@@ -695,7 +695,7 @@ class template_compile
* NOTE: does not expect a trailing "." on the blockname.
* @access private
*/
- function generate_block_data_ref($blockname, $include_last_iterator, $defop = false)
+ private function generate_block_data_ref($blockname, $include_last_iterator, $defop = false)
{
// Get an array of the blocks involved.
$blocks = explode('.', $blockname);
@@ -733,7 +733,7 @@ class template_compile
* Write compiled file to cache directory
* @access private
*/
- function compile_write($handle, $data)
+ public function compile_write($handle, $data)
{
global $phpEx;
@@ -742,7 +742,7 @@ class template_compile
if ($fp = @fopen($filename, 'wb'))
{
@flock($fp, LOCK_EX);
- @fwrite ($fp, $data);
+ @fwrite($fp, $data);
@flock($fp, LOCK_UN);
@fclose($fp);
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php
index 2925a2df77..9eb32a7b45 100644
--- a/phpBB/includes/functions_transfer.php
+++ b/phpBB/includes/functions_transfer.php
@@ -36,7 +36,7 @@ class transfer
/**
* Constructor - init some basic values
*/
- function transfer()
+ function __construct()
{
global $phpbb_root_path;
@@ -50,7 +50,7 @@ class transfer
/**
* Write file to location
*/
- function write_file($destination_file = '', $contents = '')
+ public function write_file($destination_file = '', $contents = '')
{
global $phpbb_root_path;
@@ -86,7 +86,7 @@ class transfer
/**
* Moving file into location. If the destination file already exists it gets overwritten
*/
- function overwrite_file($source_file, $destination_file)
+ public function overwrite_file($source_file, $destination_file)
{
/**
* @todo generally think about overwriting files in another way, by creating a temporary file and then renaming it
@@ -102,7 +102,7 @@ class transfer
/**
* Create directory structure
*/
- function make_dir($dir)
+ public function make_dir($dir)
{
global $phpbb_root_path;
@@ -142,7 +142,7 @@ class transfer
/**
* Copy file from source location to destination location
*/
- function copy_file($from_loc, $to_loc)
+ public function copy_file($from_loc, $to_loc)
{
global $phpbb_root_path;
@@ -162,7 +162,7 @@ class transfer
/**
* Remove file
*/
- function delete_file($file)
+ public function delete_file($file)
{
global $phpbb_root_path;
@@ -175,7 +175,7 @@ class transfer
* Remove directory
* @todo remove child directories?
*/
- function remove_dir($dir)
+ public function remove_dir($dir)
{
global $phpbb_root_path;
@@ -187,7 +187,7 @@ class transfer
/**
* Rename a file or folder
*/
- function rename($old_handle, $new_handle)
+ public function rename($old_handle, $new_handle)
{
global $phpbb_root_path;
@@ -199,7 +199,7 @@ class transfer
/**
* Check if a specified file exist...
*/
- function file_exists($directory, $filename)
+ public function file_exists($directory, $filename)
{
global $phpbb_root_path;
@@ -219,7 +219,7 @@ class transfer
/**
* Open session
*/
- function open_session()
+ public function open_session()
{
return $this->_init();
}
@@ -227,7 +227,7 @@ class transfer
/**
* Close current session
*/
- function close_session()
+ public function close_session()
{
return $this->_close();
}
@@ -235,7 +235,7 @@ class transfer
/**
* Determine methods able to be used
*/
- function methods()
+ public static function methods()
{
$methods = array();
$disabled_functions = explode(',', @ini_get('disable_functions'));
@@ -263,7 +263,7 @@ class ftp extends transfer
/**
* Standard parameters for FTP session
*/
- function ftp($host, $username, $password, $root_path, $port = 21, $timeout = 10)
+ function __construct($host, $username, $password, $root_path, $port = 21, $timeout = 10)
{
$this->host = $host;
$this->port = $port;
@@ -280,7 +280,7 @@ class ftp extends transfer
}
// Init some needed values
- transfer::transfer();
+ parent::__construct();
return;
}
@@ -288,7 +288,7 @@ class ftp extends transfer
/**
* Requests data
*/
- function data()
+ private function data()
{
global $user;
@@ -306,7 +306,7 @@ class ftp extends transfer
* Init FTP Session
* @access private
*/
- function _init()
+ private function _init()
{
// connect to the server
$this->connection = @ftp_connect($this->host, $this->port, $this->timeout);
@@ -338,7 +338,7 @@ class ftp extends transfer
* Create Directory (MKDIR)
* @access private
*/
- function _mkdir($dir)
+ private function _mkdir($dir)
{
return @ftp_mkdir($this->connection, $dir);
}
@@ -347,7 +347,7 @@ class ftp extends transfer
* Remove directory (RMDIR)
* @access private
*/
- function _rmdir($dir)
+ private function _rmdir($dir)
{
return @ftp_rmdir($this->connection, $dir);
}
@@ -356,7 +356,7 @@ class ftp extends transfer
* Rename file
* @access private
*/
- function _rename($old_handle, $new_handle)
+ private function _rename($old_handle, $new_handle)
{
return @ftp_rename($this->connection, $old_handle, $new_handle);
}
@@ -365,7 +365,7 @@ class ftp extends transfer
* Change current working directory (CHDIR)
* @access private
*/
- function _chdir($dir = '')
+ private function _chdir($dir = '')
{
if ($dir && $dir !== '/')
{
@@ -382,7 +382,7 @@ class ftp extends transfer
* change file permissions (CHMOD)
* @access private
*/
- function _chmod($file, $perms)
+ private function _chmod($file, $perms)
{
if (function_exists('ftp_chmod'))
{
@@ -403,7 +403,7 @@ class ftp extends transfer
* Upload file to location (PUT)
* @access private
*/
- function _put($from_file, $to_file)
+ private function _put($from_file, $to_file)
{
// get the file extension
$file_extension = strtolower(substr(strrchr($to_file, '.'), 1));
@@ -425,7 +425,7 @@ class ftp extends transfer
* Delete file (DELETE)
* @access private
*/
- function _delete($file)
+ private function _delete($file)
{
return @ftp_delete($this->connection, $file);
}
@@ -434,7 +434,7 @@ class ftp extends transfer
* Close ftp session (CLOSE)
* @access private
*/
- function _close()
+ private function _close()
{
if (!$this->connection)
{
@@ -449,7 +449,7 @@ class ftp extends transfer
* At the moment not used by parent class
* @access private
*/
- function _cwd()
+ private function _cwd()
{
return @ftp_pwd($this->connection);
}
@@ -458,7 +458,7 @@ class ftp extends transfer
* Return list of files in a given directory (LS)
* @access private
*/
- function _ls($dir = './')
+ private function _ls($dir = './')
{
return @ftp_nlist($this->connection, $dir);
}
@@ -467,7 +467,7 @@ class ftp extends transfer
* FTP SITE command (ftp-only function)
* @access private
*/
- function _site($command)
+ private function _site($command)
{
return @ftp_site($this->connection, $command);
}
@@ -486,7 +486,7 @@ class ftp_fsock extends transfer
/**
* Standard parameters for FTP session
*/
- function ftp_fsock($host, $username, $password, $root_path, $port = 21, $timeout = 10)
+ function __construct($host, $username, $password, $root_path, $port = 21, $timeout = 10)
{
$this->host = $host;
$this->port = $port;
@@ -503,7 +503,7 @@ class ftp_fsock extends transfer
}
// Init some needed values
- transfer::transfer();
+ parent::__construct();
return;
}
@@ -511,7 +511,7 @@ class ftp_fsock extends transfer
/**
* Requests data
*/
- function data()
+ private function data()
{
global $user;
@@ -529,7 +529,7 @@ class ftp_fsock extends transfer
* Init FTP Session
* @access private
*/
- function _init()
+ private function _init()
{
$errno = 0;
$errstr = '';
@@ -568,7 +568,7 @@ class ftp_fsock extends transfer
* Create Directory (MKDIR)
* @access private
*/
- function _mkdir($dir)
+ private function _mkdir($dir)
{
return $this->_send_command('MKD', $dir);
}
@@ -577,7 +577,7 @@ class ftp_fsock extends transfer
* Remove directory (RMDIR)
* @access private
*/
- function _rmdir($dir)
+ private function _rmdir($dir)
{
return $this->_send_command('RMD', $dir);
}
@@ -586,7 +586,7 @@ class ftp_fsock extends transfer
* Rename File
* @access private
*/
- function _rename($old_handle, $new_handle)
+ private function _rename($old_handle, $new_handle)
{
$this->_send_command('RNFR', $old_handle);
return $this->_send_command('RNTO', $new_handle);
@@ -613,7 +613,7 @@ class ftp_fsock extends transfer
* change file permissions (CHMOD)
* @access private
*/
- function _chmod($file, $perms)
+ private function _chmod($file, $perms)
{
// Unfortunatly CHMOD is not expecting an octal value...
// We need to transform the integer (which was an octal) to an octal representation (to get the int) and then pass as is. ;)
@@ -624,7 +624,7 @@ class ftp_fsock extends transfer
* Upload file to location (PUT)
* @access private
*/
- function _put($from_file, $to_file)
+ private function _put($from_file, $to_file)
{
// We only use the BINARY file mode to cicumvent rewrite actions from ftp server (mostly linefeeds being replaced)
// 'I' == BINARY
@@ -660,7 +660,7 @@ class ftp_fsock extends transfer
* Delete file (DELETE)
* @access private
*/
- function _delete($file)
+ private function _delete($file)
{
return $this->_send_command('DELE', $file);
}
@@ -669,7 +669,7 @@ class ftp_fsock extends transfer
* Close ftp session (CLOSE)
* @access private
*/
- function _close()
+ private function _close()
{
if (!$this->connection)
{
@@ -684,7 +684,7 @@ class ftp_fsock extends transfer
* At the moment not used by parent class
* @access private
*/
- function _cwd()
+ private function _cwd()
{
$this->_send_command('PWD', '', false);
return preg_replace('#^[0-9]{3} "(.+)" .+\r\n#', '\\1', $this->_check_command(true));
@@ -694,7 +694,7 @@ class ftp_fsock extends transfer
* Return list of files in a given directory (LS)
* @access private
*/
- function _ls($dir = './')
+ private function _ls($dir = './')
{
if (!$this->_open_data_connection())
{
@@ -717,7 +717,7 @@ class ftp_fsock extends transfer
* Send a command to server (FTP fsock only function)
* @access private
*/
- function _send_command($command, $args = '', $check = true)
+ private function _send_command($command, $args = '', $check = true)
{
if (!empty($args))
{
@@ -738,7 +738,7 @@ class ftp_fsock extends transfer
* Opens a connection to send data (FTP fosck only function)
* @access private
*/
- function _open_data_connection()
+ private function _open_data_connection()
{
$this->_send_command('PASV', '', false);
@@ -773,7 +773,7 @@ class ftp_fsock extends transfer
* Closes a connection used to send data
* @access private
*/
- function _close_data_connection()
+ private function _close_data_connection()
{
return @fclose($this->data_connection);
}
@@ -782,7 +782,7 @@ class ftp_fsock extends transfer
* Check to make sure command was successful (FTP fsock only function)
* @access private
*/
- function _check_command($return = false)
+ private function _check_command($return = false)
{
$response = '';
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index 8e4bb6284a..f28e299f10 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -48,7 +48,7 @@ class filespec
* File Class
* @access private
*/
- function filespec($upload_ary, $upload_namespace)
+ function __construct($upload_ary, $upload_namespace)
{
if (!isset($upload_ary))
{
@@ -446,7 +446,7 @@ class fileupload
* @param int $max_height Maximum image height (only checked for images)
*
*/
- function fileupload($error_prefix = '', $allowed_extensions = false, $max_filesize = false, $min_width = false, $min_height = false, $max_width = false, $max_height = false)
+ function __construct($error_prefix = '', $allowed_extensions = false, $max_filesize = false, $min_width = false, $min_height = false, $max_width = false, $max_height = false)
{
$this->set_allowed_extensions($allowed_extensions);
$this->set_max_filesize($max_filesize);
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index c9921cc6f0..edaaee3d8f 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -1354,88 +1354,38 @@ function validate_username($username, $allowed_username = false)
$mbstring = $pcre = false;
- // generic UTF-8 character types supported?
- if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
- {
- $pcre = true;
- }
- else if (function_exists('mb_ereg_match'))
- {
- mb_regex_encoding('UTF-8');
- $mbstring = true;
- }
-
+ // generic UTF-8 character types supported
switch ($config['allow_name_chars'])
{
case 'USERNAME_CHARS_ANY':
- $pcre = true;
$regex = '.+';
break;
case 'USERNAME_ALPHA_ONLY':
- $pcre = true;
$regex = '[A-Za-z0-9]+';
break;
case 'USERNAME_ALPHA_SPACERS':
- $pcre = true;
$regex = '[A-Za-z0-9-[\]_+ ]+';
break;
case 'USERNAME_LETTER_NUM':
- if ($pcre)
- {
- $regex = '[\p{Lu}\p{Ll}\p{N}]+';
- }
- else if ($mbstring)
- {
- $regex = '[[:upper:][:lower:][:digit:]]+';
- }
- else
- {
- $pcre = true;
- $regex = '[a-zA-Z0-9]+';
- }
+ $regex = '[\p{Lu}\p{Ll}\p{N}]+';
break;
case 'USERNAME_LETTER_NUM_SPACERS':
- if ($pcre)
- {
- $regex = '[-\]_+ [\p{Lu}\p{Ll}\p{N}]+';
- }
- else if ($mbstring)
- {
- $regex = '[-\]_+ [[:upper:][:lower:][:digit:]]+';
- }
- else
- {
- $pcre = true;
- $regex = '[-\]_+ [a-zA-Z0-9]+';
- }
+ $regex = '[-\]_+ [\p{Lu}\p{Ll}\p{N}]+';
break;
case 'USERNAME_ASCII':
default:
- $pcre = true;
$regex = '[\x01-\x7F]+';
break;
}
- if ($pcre)
+ if (!preg_match('#^' . $regex . '$#u', $username))
{
- if (!preg_match('#^' . $regex . '$#u', $username))
- {
- return 'INVALID_CHARS';
- }
- }
- else if ($mbstring)
- {
- $matches = array();
- mb_ereg_search_init('^' . $username . '$', $regex, $matches);
- if (!mb_ereg_search())
- {
- return 'INVALID_CHARS';
- }
+ return 'INVALID_CHARS';
}
$sql = 'SELECT username
@@ -1462,7 +1412,7 @@ function validate_username($username, $allowed_username = false)
return 'USERNAME_TAKEN';
}
- $bad_usernames = $cache->obtain_disallowed_usernames();
+ $bad_usernames = cache::obtain_disallowed_usernames();
foreach ($bad_usernames as $bad_username)
{
@@ -1503,37 +1453,12 @@ function validate_password($password)
return false;
}
- $pcre = $mbstring = false;
-
- // generic UTF-8 character types supported?
- if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
- {
- $upp = '\p{Lu}';
- $low = '\p{Ll}';
- $let = '\p{L}';
- $num = '\p{N}';
- $sym = '[^\p{Lu}\p{Ll}\p{N}]';
- $pcre = true;
- }
- else if (function_exists('mb_ereg_match'))
- {
- mb_regex_encoding('UTF-8');
- $upp = '[[:upper:]]';
- $low = '[[:lower:]]';
- $let = '[[:lower:][:upper:]]';
- $num = '[[:digit:]]';
- $sym = '[^[:upper:][:lower:][:digit:]]';
- $mbstring = true;
- }
- else
- {
- $upp = '[A-Z]';
- $low = '[a-z]';
- $let = '[a-zA-Z]';
- $num = '[0-9]';
- $sym = '[^A-Za-z0-9]';
- $pcre = true;
- }
+ // generic UTF-8 character types supported
+ $upp = '\p{Lu}';
+ $low = '\p{Ll}';
+ $let = '\p{L}';
+ $num = '\p{N}';
+ $sym = '[^\p{Lu}\p{Ll}\p{N}]';
$chars = array();
@@ -1799,6 +1724,7 @@ function validate_jabber($jid)
$pos = 0;
$result = true;
+ // @todo: rewrite this!
while ($pos < strlen($username))
{
$len = $uni = 0;
diff --git a/phpBB/includes/hooks/index.php b/phpBB/includes/hooks/index.php
index aa85e63f32..7db4eec96c 100644
--- a/phpBB/includes/hooks/index.php
+++ b/phpBB/includes/hooks/index.php
@@ -42,7 +42,7 @@ class phpbb_hook
*
* @param array $valid_hooks array containing the hookable functions/methods
*/
- function phpbb_hook($valid_hooks)
+ function __construct($valid_hooks)
{
foreach ($valid_hooks as $_null => $method)
{
diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php
index d97fbb7107..1cba3157d7 100644
--- a/phpBB/includes/mcp/mcp_forum.php
+++ b/phpBB/includes/mcp/mcp_forum.php
@@ -132,7 +132,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
));
// Grab icons
- $icons = $cache->obtain_icons();
+ $icons = cache::obtain_icons();
$topic_rows = array();
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index 6c20cf85b4..6c74e65f5b 100755
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -26,7 +26,7 @@ class mcp_logs
var $u_action;
var $p_master;
- function mcp_logs(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 3332ab04d8..3b4f27d751 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -26,7 +26,7 @@ class mcp_main
var $p_master;
var $u_action;
- function mcp_main(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php
index 42a64055ce..b4804d56ea 100755
--- a/phpBB/includes/mcp/mcp_notes.php
+++ b/phpBB/includes/mcp/mcp_notes.php
@@ -26,7 +26,7 @@ class mcp_notes
var $p_master;
var $u_action;
- function mcp_notes(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index 8f4630bf4c..8d4ea46e31 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -140,7 +140,7 @@ function mcp_post_details($id, $mode, $action)
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
{
- $extensions = $cache->obtain_attach_extensions($post_info['forum_id']);
+ $extensions = cache::obtain_attach_extensions($post_info['forum_id']);
$sql = 'SELECT *
FROM ' . ATTACHMENTS_TABLE . '
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 6d7f9ffaba..88fc9cb13d 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -26,7 +26,7 @@ class mcp_queue
var $p_master;
var $u_action;
- function mcp_queue(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
@@ -140,7 +140,7 @@ class mcp_queue
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
{
- $extensions = $cache->obtain_attach_extensions($post_info['forum_id']);
+ $extensions = cache::obtain_attach_extensions($post_info['forum_id']);
$sql = 'SELECT *
FROM ' . ATTACHMENTS_TABLE . '
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 37ea7e5132..4e607b79c7 100755
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -26,7 +26,7 @@ class mcp_reports
var $p_master;
var $u_action;
- function mcp_reports(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
@@ -149,7 +149,7 @@ class mcp_reports
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
{
- $extensions = $cache->obtain_attach_extensions($post_info['forum_id']);
+ $extensions = cache::obtain_attach_extensions($post_info['forum_id']);
$sql = 'SELECT *
FROM ' . ATTACHMENTS_TABLE . '
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index f8214e4f1b..ca566b1524 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -164,7 +164,7 @@ function mcp_topic_view($id, $mode, $action)
$extensions = $attachments = array();
if ($topic_info['topic_attachment'] && sizeof($post_id_list))
{
- $extensions = $cache->obtain_attach_extensions($topic_info['forum_id']);
+ $extensions = cache::obtain_attach_extensions($topic_info['forum_id']);
// Get attachments...
if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $topic_info['forum_id']))
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index 315a2c1362..6751ef41bf 100755
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -26,7 +26,7 @@ class mcp_warn
var $p_master;
var $u_action;
- function mcp_warn(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index 1cd28fc6d2..b359b3ba1c 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -28,42 +28,25 @@ include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
*/
class fulltext_mysql extends search_backend
{
- var $stats = array();
- var $word_length = array();
- var $split_words = array();
- var $search_query;
- var $common_words = array();
- var $pcre_properties = false;
- var $mbstring_regex = false;
-
- function fulltext_mysql(&$error)
+ private $stats = array();
+ public $word_length = array();
+ private $split_words = array();
+ public $search_query;
+ public $common_words = array();
+
+ function __construct(&$error)
{
global $config;
$this->word_length = array('min' => $config['fulltext_mysql_min_word_len'], 'max' => $config['fulltext_mysql_max_word_len']);
- if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>=')))
- {
- // While this is the proper range of PHP versions, PHP may not be linked with the bundled PCRE lib and instead with an older version
- if (@preg_match('/\p{L}/u', 'a') !== false)
- {
- $this->pcre_properties = true;
- }
- }
-
- if (function_exists('mb_ereg'))
- {
- $this->mbstring_regex = true;
- mb_regex_encoding('UTF-8');
- }
-
$error = false;
}
/**
* Checks for correct MySQL version and stores min/max word length in the config
*/
- function init()
+ public function init()
{
global $db, $user;
@@ -116,7 +99,7 @@ class fulltext_mysql extends search_backend
* @param string $terms is either 'all' or 'any'
* @return bool false if no valid keywords were found and otherwise true
*/
- function split_keywords(&$keywords, $terms)
+ public function split_keywords(&$keywords, $terms)
{
global $config;
@@ -132,40 +115,11 @@ class fulltext_mysql extends search_backend
$split_keywords = preg_replace("#[\n\r\t]+#", ' ', trim(htmlspecialchars_decode($keywords)));
// Split words
- if ($this->pcre_properties)
- {
- $split_keywords = preg_replace('#([^\p{L}\p{N}\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords)));
- }
- else if ($this->mbstring_regex)
- {
- $split_keywords = mb_ereg_replace('([^\w\'*"()])', '\\1\\1', str_replace('\'\'', '\' \'', trim($split_keywords)));
- }
- else
- {
- $split_keywords = preg_replace('#([^\w\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords)));
- }
+ $split_keywords = preg_replace('#([^\p{L}\p{N}\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords)));
- if ($this->pcre_properties)
- {
- $matches = array();
- preg_match_all('#(?:[^\p{L}\p{N}*"()]|^)([+\-|]?(?:[\p{L}\p{N}*"()]+\'?)*[\p{L}\p{N}*"()])(?:[^\p{L}\p{N}*"()]|$)#u', $split_keywords, $matches);
- $this->split_words = $matches[1];
- }
- else if ($this->mbstring_regex)
- {
- mb_ereg_search_init($split_keywords, '(?:[^\w*"()]|^)([+\-|]?(?:[\w*"()]+\'?)*[\w*"()])(?:[^\w*"()]|$)');
-
- while (($word = mb_ereg_search_regs()))
- {
- $this->split_words[] = $word[1];
- }
- }
- else
- {
- $matches = array();
- preg_match_all('#(?:[^\w*"()]|^)([+\-|]?(?:[\w*"()]+\'?)*[\w*"()])(?:[^\w*"()]|$)#u', $split_keywords, $matches);
- $this->split_words = $matches[1];
- }
+ $matches = array();
+ preg_match_all('#(?:[^\p{L}\p{N}*"()]|^)([+\-|]?(?:[\p{L}\p{N}*"()]+\'?)*[\p{L}\p{N}*"()])(?:[^\p{L}\p{N}*"()]|$)#u', $split_keywords, $matches);
+ $this->split_words = $matches[1];
// to allow phrase search, we need to concatenate quoted words
$tmp_split_words = array();
@@ -259,46 +213,16 @@ class fulltext_mysql extends search_backend
/**
* Turns text into an array of words
*/
- function split_message($text)
+ private function split_message($text)
{
global $config;
// Split words
- if ($this->pcre_properties)
- {
- $text = preg_replace('#([^\p{L}\p{N}\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($text)));
- }
- else if ($this->mbstring_regex)
- {
- $text = mb_ereg_replace('([^\w\'*])', '\\1\\1', str_replace('\'\'', '\' \'', trim($text)));
- }
- else
- {
- $text = preg_replace('#([^\w\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($text)));
- }
+ $text = preg_replace('#([^\p{L}\p{N}\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($text)));
- if ($this->pcre_properties)
- {
- $matches = array();
- preg_match_all('#(?:[^\p{L}\p{N}*]|^)([+\-|]?(?:[\p{L}\p{N}*]+\'?)*[\p{L}\p{N}*])(?:[^\p{L}\p{N}*]|$)#u', $text, $matches);
- $text = $matches[1];
- }
- else if ($this->mbstring_regex)
- {
- mb_ereg_search_init($text, '(?:[^\w*]|^)([+\-|]?(?:[\w*]+\'?)*[\w*])(?:[^\w*]|$)');
-
- $text = array();
- while (($word = mb_ereg_search_regs()))
- {
- $text[] = $word[1];
- }
- }
- else
- {
- $matches = array();
- preg_match_all('#(?:[^\w*]|^)([+\-|]?(?:[\w*]+\'?)*[\w*])(?:[^\w*]|$)#u', $text, $matches);
- $text = $matches[1];
- }
+ $matches = array();
+ preg_match_all('#(?:[^\p{L}\p{N}*]|^)([+\-|]?(?:[\p{L}\p{N}*]+\'?)*[\p{L}\p{N}*])(?:[^\p{L}\p{N}*]|$)#u', $text, $matches);
+ $text = $matches[1];
// remove too short or too long words
$text = array_values($text);
@@ -335,7 +259,7 @@ class fulltext_mysql extends search_backend
*
* @access public
*/
- function keyword_search($type, &$fields, &$terms, &$sort_by_sql, &$sort_key, &$sort_dir, &$sort_days, &$ex_fid_ary, &$m_approve_fid_ary, &$topic_id, &$author_ary, &$id_ary, $start, $per_page)
+ public function keyword_search($type, &$fields, &$terms, &$sort_by_sql, &$sort_key, &$sort_dir, &$sort_days, &$ex_fid_ary, &$m_approve_fid_ary, &$topic_id, &$author_ary, &$id_ary, $start, $per_page)
{
global $config, $db;
@@ -361,7 +285,7 @@ class fulltext_mysql extends search_backend
// try reading the results from cache
$result_count = 0;
- if ($this->obtain_ids($search_key, $result_count, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
+ if ($this->obtain_ids($search_key, $result_count, $id_ary, $start, $per_page, $sort_dir) == self::SEARCH_RESULT_IN_CACHE)
{
return $result_count;
}
@@ -494,7 +418,7 @@ class fulltext_mysql extends search_backend
* @param int $per_page number of ids each page is supposed to contain
* @return total number of results
*/
- function author_search($type, $firstpost_only, &$sort_by_sql, &$sort_key, &$sort_dir, &$sort_days, &$ex_fid_ary, &$m_approve_fid_ary, &$topic_id, &$author_ary, &$id_ary, $start, $per_page)
+ public function author_search($type, $firstpost_only, &$sort_by_sql, &$sort_key, &$sort_dir, &$sort_days, &$ex_fid_ary, &$m_approve_fid_ary, &$topic_id, &$author_ary, &$id_ary, $start, $per_page)
{
global $config, $db;
@@ -521,7 +445,7 @@ class fulltext_mysql extends search_backend
// try reading the results from cache
$result_count = 0;
- if ($this->obtain_ids($search_key, $result_count, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
+ if ($this->obtain_ids($search_key, $result_count, $id_ary, $start, $per_page, $sort_dir) == self::SEARCH_RESULT_IN_CACHE)
{
return $result_count;
}
@@ -642,7 +566,7 @@ class fulltext_mysql extends search_backend
*
* @param string $mode contains the post mode: edit, post, reply, quote ...
*/
- function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
+ public function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
{
global $db;
@@ -664,7 +588,7 @@ class fulltext_mysql extends search_backend
/**
* Destroy cached results, that might be outdated after deleting a post
*/
- function index_remove($post_ids, $author_ids, $forum_ids)
+ public function index_remove($post_ids, $author_ids, $forum_ids)
{
$this->destroy_cache(array(), $author_ids);
}
@@ -672,7 +596,7 @@ class fulltext_mysql extends search_backend
/**
* Destroy old cache entries
*/
- function tidy()
+ public function tidy()
{
global $db, $config;
@@ -685,7 +609,7 @@ class fulltext_mysql extends search_backend
/**
* Create fulltext index
*/
- function create_index($acp_module, $u_action)
+ public function create_index($acp_module, $u_action)
{
global $db;
@@ -746,7 +670,7 @@ class fulltext_mysql extends search_backend
/**
* Drop fulltext index
*/
- function delete_index($acp_module, $u_action)
+ public function delete_index($acp_module, $u_action)
{
global $db;
@@ -791,7 +715,7 @@ class fulltext_mysql extends search_backend
/**
* Returns true if both FULLTEXT indexes exist
*/
- function index_created()
+ public function index_created()
{
if (empty($this->stats))
{
@@ -804,7 +728,7 @@ class fulltext_mysql extends search_backend
/**
* Returns an associative array containing information about the indexes
*/
- function index_stats()
+ public function index_stats()
{
global $user;
@@ -818,7 +742,7 @@ class fulltext_mysql extends search_backend
);
}
- function get_stats()
+ private function get_stats()
{
global $db;
@@ -863,22 +787,13 @@ class fulltext_mysql extends search_backend
}
/**
- * Display a note, that UTF-8 support is not available with certain versions of PHP
+ * Display nothing, we force UTF-8 support in all versions of PHP
*/
function acp()
{
global $user, $config;
- $tpl = '
- <dl>
- <dt><label>' . $user->lang['FULLTEXT_MYSQL_PCRE'] . '</label><br /><span>' . $user->lang['FULLTEXT_MYSQL_PCRE_EXPLAIN'] . '</span></dt>
- <dd>' . (($this->pcre_properties) ? $user->lang['YES'] : $user->lang['NO']) . ' (PHP ' . PHP_VERSION . ')</dd>
- </dl>
- <dl>
- <dt><label>' . $user->lang['FULLTEXT_MYSQL_MBSTRING'] . '</label><br /><span>' . $user->lang['FULLTEXT_MYSQL_MBSTRING_EXPLAIN'] . '</span></dt>
- <dd>' . (($this->mbstring_regex) ? $user->lang['YES'] : $user->lang['NO']). '</dd>
- </dl>
- ';
+ $tpl = '';
// These are fields required in the config table
return array(
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index bfcb02f8e6..89689151fe 100755
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -28,14 +28,14 @@ include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
*/
class fulltext_native extends search_backend
{
- var $stats = array();
- var $word_length = array();
- var $search_query;
- var $common_words = array();
+ private $stats = array();
+ public $word_length = array();
+ public $search_query;
+ public $common_words = array();
- var $must_contain_ids = array();
- var $must_not_contain_ids = array();
- var $must_exclude_one_ids = array();
+ private $must_contain_ids = array();
+ private $must_not_contain_ids = array();
+ private $must_exclude_one_ids = array();
/**
* Initialises the fulltext_native search backend with min/max word length and makes sure the UTF-8 normalizer is loaded.
@@ -44,7 +44,7 @@ class fulltext_native extends search_backend
*
* @access public
*/
- function fulltext_native(&$error)
+ function __construct(&$error)
{
global $phpbb_root_path, $phpEx, $config;
@@ -79,7 +79,7 @@ class fulltext_native extends search_backend
*
* @access public
*/
- function split_keywords($keywords, $terms)
+ public function split_keywords($keywords, $terms)
{
global $db, $user;
@@ -402,7 +402,7 @@ class fulltext_native extends search_backend
*
* @access public
*/
- function keyword_search($type, &$fields, &$terms, &$sort_by_sql, &$sort_key, &$sort_dir, &$sort_days, &$ex_fid_ary, &$m_approve_fid_ary, &$topic_id, &$author_ary, &$id_ary, $start, $per_page)
+ public function keyword_search($type, &$fields, &$terms, &$sort_by_sql, &$sort_key, &$sort_dir, &$sort_days, &$ex_fid_ary, &$m_approve_fid_ary, &$topic_id, &$author_ary, &$id_ary, $start, $per_page)
{
global $config, $db;
@@ -430,7 +430,7 @@ class fulltext_native extends search_backend
// try reading the results from cache
$total_results = 0;
- if ($this->obtain_ids($search_key, $total_results, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
+ if ($this->obtain_ids($search_key, $total_results, $id_ary, $start, $per_page, $sort_dir) == self::SEARCH_RESULT_IN_CACHE)
{
return $total_results;
}
@@ -761,7 +761,7 @@ class fulltext_native extends search_backend
*
* @access public
*/
- function author_search($type, $firstpost_only, &$sort_by_sql, &$sort_key, &$sort_dir, &$sort_days, &$ex_fid_ary, &$m_approve_fid_ary, &$topic_id, &$author_ary, &$id_ary, $start, $per_page)
+ public function author_search($type, $firstpost_only, &$sort_by_sql, &$sort_key, &$sort_dir, &$sort_days, &$ex_fid_ary, &$m_approve_fid_ary, &$topic_id, &$author_ary, &$id_ary, $start, $per_page)
{
global $config, $db;
@@ -788,7 +788,7 @@ class fulltext_native extends search_backend
// try reading the results from cache
$total_results = 0;
- if ($this->obtain_ids($search_key, $total_results, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
+ if ($this->obtain_ids($search_key, $total_results, $id_ary, $start, $per_page, $sort_dir) == self::SEARCH_RESULT_IN_CACHE)
{
return $total_results;
}
@@ -973,7 +973,7 @@ class fulltext_native extends search_backend
*
* @access private
*/
- function split_message($text)
+ private function split_message($text)
{
global $phpbb_root_path, $phpEx, $user;
@@ -1052,7 +1052,7 @@ class fulltext_native extends search_backend
*
* @access public
*/
- function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
+ public function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
{
global $config, $db, $user;
@@ -1211,7 +1211,7 @@ class fulltext_native extends search_backend
/**
* Removes entries from the wordmatch table for the specified post_ids
*/
- function index_remove($post_ids, $author_ids, $forum_ids)
+ public function index_remove($post_ids, $author_ids, $forum_ids)
{
global $db;
@@ -1271,7 +1271,7 @@ class fulltext_native extends search_backend
* Tidy up indexes: Tag 'common words' and remove
* words no longer referenced in the match table
*/
- function tidy()
+ public function tidy()
{
global $db, $config;
@@ -1336,7 +1336,7 @@ class fulltext_native extends search_backend
/**
* Deletes all words from the index
*/
- function delete_index($acp_module, $u_action)
+ public function delete_index($acp_module, $u_action)
{
global $db;
@@ -1360,7 +1360,7 @@ class fulltext_native extends search_backend
/**
* Returns true if both FULLTEXT indexes exist
*/
- function index_created()
+ public function index_created()
{
if (!sizeof($this->stats))
{
@@ -1373,7 +1373,7 @@ class fulltext_native extends search_backend
/**
* Returns an associative array containing information about the indexes
*/
- function index_stats()
+ public function index_stats()
{
global $user;
@@ -1387,7 +1387,7 @@ class fulltext_native extends search_backend
$user->lang['TOTAL_MATCHES'] => $this->stats['total_matches']);
}
- function get_stats()
+ private function get_stats()
{
global $db;
@@ -1414,24 +1414,16 @@ class fulltext_native extends search_backend
*
* @param string $text Text to split, in UTF-8 (not normalized or sanitized)
* @param string $allowed_chars String of special chars to allow
- * @param string $encoding Text encoding
* @return string Cleaned up text, only alphanumeric chars are left
*
* @todo normalizer::cleanup being able to be used?
*/
- function cleanup($text, $allowed_chars = null, $encoding = 'utf-8')
+ private function cleanup($text, $allowed_chars = null)
{
global $phpbb_root_path, $phpEx;
static $conv = array(), $conv_loaded = array();
$words = $allow = array();
- // Convert the text to UTF-8
- $encoding = strtolower($encoding);
- if ($encoding != 'utf-8')
- {
- $text = utf8_recode($text, $encoding);
- }
-
$utf_len_mask = array(
"\xC0" => 2,
"\xD0" => 2,
@@ -1649,7 +1641,7 @@ class fulltext_native extends search_backend
/**
* Returns a list of options for the ACP to display
*/
- function acp()
+ public function acp()
{
global $user, $config;
diff --git a/phpBB/includes/search/search.php b/phpBB/includes/search/search.php
index 32d7ed595f..e13a59caed 100755
--- a/phpBB/includes/search/search.php
+++ b/phpBB/includes/search/search.php
@@ -17,13 +17,6 @@ if (!defined('IN_PHPBB'))
}
/**
-* @ignore
-*/
-define('SEARCH_RESULT_NOT_IN_CACHE', 0);
-define('SEARCH_RESULT_IN_CACHE', 1);
-define('SEARCH_RESULT_INCOMPLETE', 2);
-
-/**
* search_backend
* optional base class for search plugins providing simple caching based on ACM
* and functions to retrieve ignore_words and synonyms
@@ -31,11 +24,15 @@ define('SEARCH_RESULT_INCOMPLETE', 2);
*/
class search_backend
{
- var $ignore_words = array();
- var $match_synonym = array();
- var $replace_synonym = array();
+ const SEARCH_RESULT_NOT_IN_CACHE = 0;
+ const SEARCH_RESULT_IN_CACHE = 1;
+ const SEARCH_RESULT_INCOMPLETE = 2;
+
+ public $ignore_words = array();
+ public $match_synonym = array();
+ public $replace_synonym = array();
- function search_backend(&$error)
+ function __construct(&$error)
{
// This class cannot be used as a search plugin
$error = true;
@@ -44,7 +41,7 @@ class search_backend
/**
* Retrieves a language dependend list of words that should be ignored by the search
*/
- function get_ignore_words()
+ public function get_ignore_words()
{
if (!sizeof($this->ignore_words))
{
@@ -66,7 +63,7 @@ class search_backend
/**
* Stores a list of synonyms that should be replaced in $this->match_synonym and $this->replace_synonym and caches them
*/
- function get_synonyms()
+ public function get_synonyms()
{
if (!sizeof($this->match_synonym))
{
@@ -95,14 +92,14 @@ class search_backend
*
* @return int SEARCH_RESULT_NOT_IN_CACHE or SEARCH_RESULT_IN_CACHE or SEARCH_RESULT_INCOMPLETE
*/
- function obtain_ids($search_key, &$result_count, &$id_ary, $start, $per_page, $sort_dir)
+ protected function obtain_ids($search_key, &$result_count, &$id_ary, $start, $per_page, $sort_dir)
{
global $cache;
if (!($stored_ids = $cache->get('_search_results_' . $search_key)))
{
// no search results cached for this search_key
- return SEARCH_RESULT_NOT_IN_CACHE;
+ return self::SEARCH_RESULT_NOT_IN_CACHE;
}
else
{
@@ -119,7 +116,7 @@ class search_backend
// the user requested a page past the last index
if ($start < 0)
{
- return SEARCH_RESULT_NOT_IN_CACHE;
+ return self::SEARCH_RESULT_NOT_IN_CACHE;
}
}
@@ -143,9 +140,9 @@ class search_backend
if (!$complete)
{
- return SEARCH_RESULT_INCOMPLETE;
+ return self::SEARCH_RESULT_INCOMPLETE;
}
- return SEARCH_RESULT_IN_CACHE;
+ return self::SEARCH_RESULT_IN_CACHE;
}
}
@@ -155,7 +152,7 @@ class search_backend
* @param array &$id_ary contains a list of post or topic ids that shall be cached, the first element
* must have the absolute index $start in the result set.
*/
- function save_ids($search_key, $keywords, $author_ary, $result_count, &$id_ary, $start, $sort_dir)
+ protected function save_ids($search_key, $keywords, $author_ary, $result_count, &$id_ary, $start, $sort_dir)
{
global $cache, $config, $db, $user;
@@ -264,7 +261,7 @@ class search_backend
/**
* Removes old entries from the search results table and removes searches with keywords that contain a word in $words.
*/
- function destroy_cache($words, $authors = false)
+ public function destroy_cache($words, $authors = false)
{
global $db, $cache, $config;
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 0c61f01b02..573cbdd2c6 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -371,7 +371,7 @@ class session
* bot, act accordingly
*/
$bot = false;
- $active_bots = $cache->obtain_bots();
+ $active_bots = cache::obtain_bots();
foreach ($active_bots as $row)
{
@@ -1403,7 +1403,7 @@ class user extends session
}
// Now parse the cfg file and cache it
- $parsed_items = $cache->obtain_cfg_items($this->theme);
+ $parsed_items = cache::obtain_cfg_items($this->theme);
// We are only interested in the theme configuration for now
$parsed_items = $parsed_items['theme'];
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index 2e60beb658..e5f57cfdc2 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -28,23 +28,23 @@ class template
* if it's a root-level variable, it'll be like this:
* --> $this->_tpldata[.][0][varname] == value
*/
- var $_tpldata = array('.' => array(0 => array()));
- var $_rootref;
+ private $_tpldata = array('.' => array(0 => array()));
+ private $_rootref;
// Root dir and hash of filenames for each template handle.
- var $root = '';
- var $cachepath = '';
- var $files = array();
- var $filename = array();
+ private $root = '';
+ public $cachepath = '';
+ public $files = array();
+ public $filename = array();
// this will hash handle names to the compiled/uncompiled code for that handle.
- var $compiled_code = array();
+ public $compiled_code = array();
/**
* Set template location
* @access public
*/
- function set_template()
+ public function set_template()
{
global $phpbb_root_path, $user;
@@ -67,7 +67,7 @@ class template
* Set custom template location (able to use directory outside of phpBB)
* @access public
*/
- function set_custom_template($template_path, $template_name)
+ public function set_custom_template($template_path, $template_name)
{
global $phpbb_root_path;
@@ -82,13 +82,8 @@ class template
* should be a hash of handle => filename pairs.
* @access public
*/
- function set_filenames($filename_array)
+ public function set_filenames(array $filename_array)
{
- if (!is_array($filename_array))
- {
- return false;
- }
-
foreach ($filename_array as $handle => $filename)
{
if (empty($filename))
@@ -107,7 +102,7 @@ class template
* Destroy template data set
* @access public
*/
- function destroy()
+ function __destruct()
{
$this->_tpldata = array('.' => array(0 => array()));
}
@@ -116,7 +111,7 @@ class template
* Reset/empty complete block
* @access public
*/
- function destroy_block_vars($blockname)
+ public function destroy_block_vars($blockname)
{
if (strpos($blockname, '.') !== false)
{
@@ -146,7 +141,7 @@ class template
* Display handle
* @access public
*/
- function display($handle, $include_once = true)
+ public function display($handle, $include_once = true)
{
global $user, $phpbb_hook;
@@ -162,7 +157,7 @@ class template
{
if ((E_NOTICE & error_reporting()) == E_NOTICE)
{
- error_reporting(error_reporting() ^ E_NOTICE);
+ //error_reporting(error_reporting() ^ E_NOTICE);
}
}
@@ -182,7 +177,7 @@ class template
* Display the handle and assign the output to a template variable or return the compiled result.
* @access public
*/
- function assign_display($handle, $template_var = '', $return_content = true, $include_once = false)
+ public function assign_display($handle, $template_var = '', $return_content = true, $include_once = false)
{
ob_start();
$this->display($handle, $include_once);
@@ -202,7 +197,7 @@ class template
* Load a compiled template if possible, if not, recompile it
* @access private
*/
- function _tpl_load(&$handle)
+ private function _tpl_load(&$handle)
{
global $user, $phpEx, $config;
@@ -305,7 +300,7 @@ class template
* Assign key variable pairs from an array
* @access public
*/
- function assign_vars($vararray)
+ public function assign_vars(array $vararray)
{
foreach ($vararray as $key => $val)
{
@@ -319,7 +314,7 @@ class template
* Assign a single variable to a single key
* @access public
*/
- function assign_var($varname, $varval)
+ public function assign_var($varname, $varval)
{
$this->_rootref[$varname] = $varval;
@@ -330,7 +325,7 @@ class template
* Assign key variable pairs from an array to a specified block
* @access public
*/
- function assign_block_vars($blockname, $vararray)
+ public function assign_block_vars($blockname, array $vararray)
{
if (strpos($blockname, '.') !== false)
{
@@ -421,7 +416,7 @@ class template
* @return bool false on error, true on success
* @access public
*/
- function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')
+ public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert')
{
if (strpos($blockname, '.') !== false)
{
@@ -507,7 +502,7 @@ class template
* Include a separate template
* @access private
*/
- function _tpl_include($filename, $include = true)
+ public function _tpl_include($filename, $include = true)
{
$handle = $filename;
$this->filename[$handle] = $filename;
diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php
index 0f37c456fa..e416ff4b88 100644
--- a/phpBB/includes/ucp/ucp_confirm.php
+++ b/phpBB/includes/ucp/ucp_confirm.php
@@ -71,8 +71,7 @@ class ucp_confirm
include($phpbb_root_path . 'includes/captcha/captcha_non_gd.' . $phpEx);
}
- $captcha = new captcha();
- $captcha->execute($row['code'], $row['seed']);
+ captcha::execute($row['code'], $row['seed']);
exit;
}
}
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index c2fa50c79e..59d7431113 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -26,7 +26,7 @@ class ucp_main
var $p_master;
var $u_action;
- function ucp_main(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index e9c337519a..6ba08c36de 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -34,7 +34,7 @@ function view_folder($id, $mode, $folder_id, $folder)
$user->add_lang('viewforum');
// Grab icons
- $icons = $cache->obtain_icons();
+ $icons = cache::obtain_icons();
$color_rows = array('marked', 'replied');
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 3f109b0771..31208d9b01 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -47,7 +47,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
}
// Grab icons
- $icons = $cache->obtain_icons();
+ $icons = cache::obtain_icons();
$bbcode = false;
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 09649ebe68..b56015efc0 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -477,7 +477,7 @@ class ucp_register
if (!$change_lang || !$confirm_id)
{
$user->confirm_gc(CONFIRM_REG);
-
+
$sql = 'SELECT COUNT(session_id) AS attempts
FROM ' . CONFIRM_TABLE . "
WHERE session_id = '" . $db->sql_escape($user->session_id) . "'
diff --git a/phpBB/includes/utf/utf_normalizer.php b/phpBB/includes/utf/utf_normalizer.php
index a77952499a..5ed14d4ebb 100644
--- a/phpBB/includes/utf/utf_normalizer.php
+++ b/phpBB/includes/utf/utf_normalizer.php
@@ -15,52 +15,9 @@ if (!defined('IN_PHPBB'))
exit;
}
-/**
-* Some Unicode characters encoded in UTF-8
-*
-* Preserved for compatibility
-*/
-define('UTF8_REPLACEMENT', "\xEF\xBF\xBD");
-define('UTF8_MAX', "\xF4\x8F\xBF\xBF");
-define('UTF8_FFFE', "\xEF\xBF\xBE");
-define('UTF8_FFFF', "\xEF\xBF\xBF");
-define('UTF8_SURROGATE_FIRST', "\xED\xA0\x80");
-define('UTF8_SURROGATE_LAST', "\xED\xBF\xBF");
-define('UTF8_HANGUL_FIRST', "\xEA\xB0\x80");
-define('UTF8_HANGUL_LAST', "\xED\x9E\xA3");
-
-define('UTF8_CJK_FIRST', "\xE4\xB8\x80");
-define('UTF8_CJK_LAST', "\xE9\xBE\xBB");
-define('UTF8_CJK_B_FIRST', "\xF0\xA0\x80\x80");
-define('UTF8_CJK_B_LAST', "\xF0\xAA\x9B\x96");
-
// Unset global variables
unset($GLOBALS['utf_jamo_index'], $GLOBALS['utf_jamo_type'], $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_combining_class'], $GLOBALS['utf_canonical_comp'], $GLOBALS['utf_canonical_decomp'], $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
-// NFC_QC and NFKC_QC values
-define('UNICODE_QC_MAYBE', 0);
-define('UNICODE_QC_NO', 1);
-
-// Contains all the ASCII characters appearing in UTF-8, sorted by frequency
-define('UTF8_ASCII_RANGE', "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F");
-
-// Contains all the tail bytes that can appear in the composition of a UTF-8 char
-define('UTF8_TRAILING_BYTES', "\xA9\xA0\xA8\x80\xAA\x99\xA7\xBB\xAB\x89\x94\x82\xB4\xA2\xAE\x83\xB0\xB9\xB8\x93\xAF\xBC\xB3\x81\xA4\xB2\x9C\xA1\xB5\xBE\xBD\xBA\x98\xAD\xB1\x84\x95\xA6\xB6\x88\x8D\x90\xB7\xBF\x92\x85\xA5\x97\x8C\x86\xA3\x8E\x9F\x8F\x87\x91\x9D\xAC\x9E\x8B\x96\x9B\x8A\x9A");
-
-// Constants used by the Hangul [de]composition algorithms
-define('UNICODE_HANGUL_SBASE', 0xAC00);
-define('UNICODE_HANGUL_LBASE', 0x1100);
-define('UNICODE_HANGUL_VBASE', 0x1161);
-define('UNICODE_HANGUL_TBASE', 0x11A7);
-define('UNICODE_HANGUL_SCOUNT', 11172);
-define('UNICODE_HANGUL_LCOUNT', 19);
-define('UNICODE_HANGUL_VCOUNT', 21);
-define('UNICODE_HANGUL_TCOUNT', 28);
-define('UNICODE_HANGUL_NCOUNT', 588);
-define('UNICODE_JAMO_L', 0);
-define('UNICODE_JAMO_V', 1);
-define('UNICODE_JAMO_T', 2);
-
/**
* Unicode normalization routines
*
@@ -69,6 +26,50 @@ define('UNICODE_JAMO_T', 2);
class utf_normalizer
{
/**
+ * Some Unicode characters encoded in UTF-8
+ *
+ * Preserved for compatibility
+ */
+
+ const UTF8_REPLACEMENT = "\xEF\xBF\xBD";
+ const UTF8_MAX = "\xF4\x8F\xBF\xBF";
+ const UTF8_FFFE = "\xEF\xBF\xBE";
+ const UTF8_FFFF = "\xEF\xBF\xBF";
+ const UTF8_SURROGATE_FIRST = "\xED\xA0\x80";
+ const UTF8_SURROGATE_LAST = "\xED\xBF\xBF";
+ const UTF8_HANGUL_FIRST = "\xEA\xB0\x80";
+ const UTF8_HANGUL_LAST = "\xED\x9E\xA3";
+
+ const UTF8_CJK_FIRST = "\xE4\xB8\x80";
+ const UTF8_CJK_LAST = "\xE9\xBE\xBB";
+ const UTF8_CJK_B_FIRST = "\xF0\xA0\x80\x80";
+ const UTF8_CJK_B_LAST = "\xF0\xAA\x9B\x96";
+
+ // NFC_QC and NFKC_QC values
+ const UNICODE_QC_MAYBE = 0;
+ const UNICODE_QC_NO = 1;
+
+ // Contains all the ASCII characters appearing in UTF-8, sorted by frequency
+ const UTF8_ASCII_RANGE = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F";
+
+ // Contains all the tail bytes that can appear in the composition of a UTF-8 char
+ const UTF8_TRAILING_BYTES = "\xA9\xA0\xA8\x80\xAA\x99\xA7\xBB\xAB\x89\x94\x82\xB4\xA2\xAE\x83\xB0\xB9\xB8\x93\xAF\xBC\xB3\x81\xA4\xB2\x9C\xA1\xB5\xBE\xBD\xBA\x98\xAD\xB1\x84\x95\xA6\xB6\x88\x8D\x90\xB7\xBF\x92\x85\xA5\x97\x8C\x86\xA3\x8E\x9F\x8F\x87\x91\x9D\xAC\x9E\x8B\x96\x9B\x8A\x9A";
+
+ // Constants used by the Hangul [de]composition algorithms
+ const UNICODE_HANGUL_SBASE = 0xAC00;
+ const UNICODE_HANGUL_LBASE = 0x1100;
+ const UNICODE_HANGUL_VBASE = 0x1161;
+ const UNICODE_HANGUL_TBASE = 0x11A7;
+ const UNICODE_HANGUL_SCOUNT = 11172;
+ const UNICODE_HANGUL_LCOUNT = 19;
+ const UNICODE_HANGUL_VCOUNT = 21;
+ const UNICODE_HANGUL_TCOUNT = 28;
+ const UNICODE_HANGUL_NCOUNT = 588;
+ const UNICODE_JAMO_L = 0;
+ const UNICODE_JAMO_V = 1;
+ const UNICODE_JAMO_T = 2;
+
+ /**
* Validate, cleanup and normalize a string
*
* The ultimate convenience function! Clean up invalid UTF-8 sequences,
@@ -77,9 +78,9 @@ class utf_normalizer
* @param string &$str The dirty string
* @return string The same string, all shiny and cleaned-up
*/
- function cleanup(&$str)
+ public static function cleanup(&$str)
{
- // The string below is the list of all autorized characters, sorted by frequency in latin text
+ // The string below is the list of all authorized characters, sorted by frequency in latin text
$pos = strspn($str, "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x0D");
$len = strlen($str);
@@ -110,7 +111,7 @@ class utf_normalizer
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
);
- $str = utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
+ $str = self::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
}
/**
@@ -119,9 +120,9 @@ class utf_normalizer
* @param string &$str Unchecked UTF string
* @return string The string, validated and in normal form
*/
- function nfc(&$str)
+ public static function nfc(&$str)
{
- $pos = strspn($str, UTF8_ASCII_RANGE);
+ $pos = strspn($str, self::UTF8_ASCII_RANGE);
$len = strlen($str);
if ($pos == $len)
@@ -142,7 +143,7 @@ class utf_normalizer
include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
}
- $str = utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
+ $str = self::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
}
/**
@@ -151,9 +152,9 @@ class utf_normalizer
* @param string &$str Unchecked UTF string
* @return string The string, validated and in normal form
*/
- function nfkc(&$str)
+ public static function nfkc(&$str)
{
- $pos = strspn($str, UTF8_ASCII_RANGE);
+ $pos = strspn($str, self::UTF8_ASCII_RANGE);
$len = strlen($str);
if ($pos == $len)
@@ -174,7 +175,7 @@ class utf_normalizer
include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx);
}
- $str = utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
+ $str = self::recompose($str, $pos, $len, $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
}
/**
@@ -183,9 +184,9 @@ class utf_normalizer
* @param string &$str Unchecked UTF string
* @return string The string, validated and in normal form
*/
- function nfd(&$str)
+ public static function nfd(&$str)
{
- $pos = strspn($str, UTF8_ASCII_RANGE);
+ $pos = strspn($str, self::UTF8_ASCII_RANGE);
$len = strlen($str);
if ($pos == $len)
@@ -200,7 +201,7 @@ class utf_normalizer
include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
}
- $str = utf_normalizer::decompose($str, $pos, $len, $GLOBALS['utf_canonical_decomp']);
+ $str = self::decompose($str, $pos, $len, $GLOBALS['utf_canonical_decomp']);
}
/**
@@ -209,9 +210,9 @@ class utf_normalizer
* @param string &$str Unchecked UTF string
* @return string The string, validated and in normal form
*/
- function nfkd(&$str)
+ public static function nfkd(&$str)
{
- $pos = strspn($str, UTF8_ASCII_RANGE);
+ $pos = strspn($str, self::UTF8_ASCII_RANGE);
$len = strlen($str);
if ($pos == $len)
@@ -226,7 +227,7 @@ class utf_normalizer
include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx);
}
- $str = utf_normalizer::decompose($str, $pos, $len, $GLOBALS['utf_compatibility_decomp']);
+ $str = self::decompose($str, $pos, $len, $GLOBALS['utf_compatibility_decomp']);
}
@@ -242,7 +243,7 @@ class utf_normalizer
*
* @access private
*/
- function recompose($str, $pos, $len, &$qc, &$decomp_map)
+ private static function recompose($str, $pos, $len, &$qc, &$decomp_map)
{
global $utf_combining_class, $utf_canonical_comp, $utf_jamo_type, $utf_jamo_index;
@@ -363,8 +364,8 @@ class utf_normalizer
$trailing_bytes = $utf_len - 1;
}
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
- $pos += strspn($str, UTF8_TRAILING_BYTES, ++$pos, $trailing_bytes);
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . self::UTF8_REPLACEMENT;
+ $pos += strspn($str, self::UTF8_TRAILING_BYTES, ++$pos, $trailing_bytes);
$tmp_pos = $pos;
continue;
@@ -379,7 +380,7 @@ class utf_normalizer
if ($utf_char >= "\xED\xA0\x80")
{
// Surrogates (U+D800..U+DFFF) are not allowed in UTF-8 (UTF sequence 0xEDA080..0xEDBFBF)
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . self::UTF8_REPLACEMENT;
$pos += $utf_len;
$tmp_pos = $pos;
continue 2;
@@ -391,7 +392,7 @@ class utf_normalizer
if ($utf_char == "\xEF\xBF\xBE" || $utf_char == "\xEF\xBF\xBF")
{
// U+FFFE and U+FFFF are explicitly disallowed (UTF sequence 0xEFBFBE..0xEFBFBF)
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . self::UTF8_REPLACEMENT;
$pos += $utf_len;
$tmp_pos = $pos;
continue 2;
@@ -403,7 +404,7 @@ class utf_normalizer
if ($utf_char <= "\xC1\xBF")
{
// Overlong sequence: Unicode char U+0000..U+007F encoded as a double-byte UTF char
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . self::UTF8_REPLACEMENT;
$pos += $utf_len;
$tmp_pos = $pos;
continue 2;
@@ -414,7 +415,7 @@ class utf_normalizer
if ($utf_char <= "\xE0\x9F\xBF")
{
// Unicode char U+0000..U+07FF encoded in 3 bytes
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . self::UTF8_REPLACEMENT;
$pos += $utf_len;
$tmp_pos = $pos;
continue 2;
@@ -425,7 +426,7 @@ class utf_normalizer
if ($utf_char <= "\xF0\x8F\xBF\xBF")
{
// Unicode char U+0000..U+FFFF encoded in 4 bytes
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . self::UTF8_REPLACEMENT;
$pos += $utf_len;
$tmp_pos = $pos;
continue 2;
@@ -454,8 +455,8 @@ class utf_normalizer
$trailing_bytes = 5;
}
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
- $pos += strspn($str, UTF8_TRAILING_BYTES, ++$pos, $trailing_bytes);
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . self::UTF8_REPLACEMENT;
+ $pos += strspn($str, self::UTF8_TRAILING_BYTES, ++$pos, $trailing_bytes);
$tmp_pos = $pos;
continue 2;
}
@@ -472,8 +473,8 @@ class utf_normalizer
{
// A trailing byte came out of nowhere, we will advance the cursor and treat the this byte and all following trailing bytes as if
// each of them was a Unicode replacement char
- $spn = strspn($str, UTF8_TRAILING_BYTES, $pos);
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . str_repeat(UTF8_REPLACEMENT, $spn);
+ $spn = strspn($str, self::UTF8_TRAILING_BYTES, $pos);
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . str_repeat(self::UTF8_REPLACEMENT, $spn);
$pos += $spn;
$tmp_pos = $pos;
@@ -533,7 +534,7 @@ class utf_normalizer
// Check out the combining class of the first character of the UTF sequence
$k = 0;
- if (isset($utf_combining_class[$utf_seq[0]]) || $qc[$utf_char] == UNICODE_QC_MAYBE)
+ if (isset($utf_combining_class[$utf_seq[0]]) || $qc[$utf_char] == self::UNICODE_QC_MAYBE)
{
// Not a starter, inspect previous characters
// The last 8 characters are kept in a buffer so that we don't have to capture them everytime.
@@ -762,12 +763,11 @@ class utf_normalizer
if (!$k && $k_max == 1)
{
// There is only one char in the UTF sequence, add it then jump to the next iteration of main loop
- // Note: the two commented lines below can be enabled under PHP5 for a very small performance gain in most cases
-// if (substr_compare($str, $utf_seq[0], $lpos, $pos - $lpos))
-// {
+ if (substr_compare($str, $utf_seq[0], $lpos, $pos - $lpos))
+ {
$tmp .= substr($str, $tmp_pos, $lpos - $tmp_pos) . $utf_seq[0];
$tmp_pos = $pos;
-// }
+ }
continue;
}
@@ -809,10 +809,10 @@ class utf_normalizer
else if (isset($utf_jamo_type[$utf_char]))
{
// Current char is a composable jamo
- if (isset($utf_jamo_type[$starter]) && $utf_jamo_type[$starter] == UNICODE_JAMO_L && $utf_jamo_type[$utf_char] == UNICODE_JAMO_V)
+ if (isset($utf_jamo_type[$starter]) && $utf_jamo_type[$starter] == self::UNICODE_JAMO_L && $utf_jamo_type[$utf_char] == self::UNICODE_JAMO_V)
{
// We have a L jamo followed by a V jamo, we are going to prefetch the next char to see if it's a T jamo
- if (isset($utf_jamo_type[$utf_seq[$k]]) && $utf_jamo_type[$utf_seq[$k]] == UNICODE_JAMO_T)
+ if (isset($utf_jamo_type[$utf_seq[$k]]) && $utf_jamo_type[$utf_seq[$k]] == self::UNICODE_JAMO_T)
{
// L+V+T jamos, combine to a LVT Hangul syllable ($k is incremented)
$cp = $utf_jamo_index[$starter] + $utf_jamo_index[$utf_char] + $utf_jamo_index[$utf_seq[$k]];
@@ -901,7 +901,7 @@ class utf_normalizer
{
if ($str[$pos] < "\x80")
{
- $pos += strspn($str, UTF8_ASCII_RANGE, ++$pos);
+ $pos += strspn($str, self::UTF8_ASCII_RANGE, ++$pos);
$buffer[++$i & 7] = $str[$pos - 1];
}
else
@@ -944,7 +944,7 @@ class utf_normalizer
*
* @access private
*/
- function decompose($str, $pos, $len, &$decomp_map)
+ private static function decompose($str, $pos, $len, &$decomp_map)
{
global $utf_combining_class;
@@ -1011,7 +1011,7 @@ class utf_normalizer
{
// A trailing byte came out of nowhere, we will treat it and all following trailing bytes as if each of them was a Unicode
// replacement char and we will advance the cursor
- $spn = strspn($str, UTF8_TRAILING_BYTES, $pos);
+ $spn = strspn($str, self::UTF8_TRAILING_BYTES, $pos);
if ($dump)
{
@@ -1031,12 +1031,12 @@ class utf_normalizer
}
}
- $tmp .= str_repeat(UTF8_REPLACEMENT, $spn);
+ $tmp .= str_repeat(self::UTF8_REPLACEMENT, $spn);
$dump = $sort = 0;
}
else
{
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . str_repeat(UTF8_REPLACEMENT, $spn);
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . str_repeat(self::UTF8_REPLACEMENT, $spn);
}
$pos += $spn;
@@ -1177,7 +1177,7 @@ class utf_normalizer
else
{
// Non-decomposable starter, check out if it's a Hangul syllable
- if ($utf_char < UTF8_HANGUL_FIRST || $utf_char > UTF8_HANGUL_LAST)
+ if ($utf_char < self::UTF8_HANGUL_FIRST || $utf_char > self::UTF8_HANGUL_LAST)
{
// Nope, regular UTF char, check that we have the correct number of trailing bytes
if (($utf_char & $utf_validation_mask[$utf_len]) != $utf_validation_check[$utf_len])
@@ -1202,8 +1202,8 @@ class utf_normalizer
// Add a replacement char then another replacement char for every trailing byte.
//
// @todo I'm not entirely sure that's how we're supposed to mark invalidated byte sequences, check this
- $spn = strspn($str, UTF8_TRAILING_BYTES, ++$pos);
- $tmp .= str_repeat(UTF8_REPLACEMENT, $spn + 1);
+ $spn = strspn($str, self::UTF8_TRAILING_BYTES, ++$pos);
+ $tmp .= str_repeat(self::UTF8_REPLACEMENT, $spn + 1);
$dump = $sort = 0;
@@ -1234,7 +1234,7 @@ class utf_normalizer
$utf_sort = array();
}
- $tmp .= UTF8_REPLACEMENT;
+ $tmp .= self::UTF8_REPLACEMENT;
$dump = $sort = 0;
$tmp_pos = $starter_pos = $pos;
@@ -1260,7 +1260,7 @@ class utf_normalizer
$utf_sort = array();
}
- $tmp .= UTF8_REPLACEMENT;
+ $tmp .= self::UTF8_REPLACEMENT;
$dump = $sort = 0;
$tmp_pos = $starter_pos = $pos;
@@ -1286,7 +1286,7 @@ class utf_normalizer
$utf_sort = array();
}
- $tmp .= UTF8_REPLACEMENT;
+ $tmp .= self::UTF8_REPLACEMENT;
$dump = $sort = 0;
$tmp_pos = $starter_pos = $pos;
@@ -1311,7 +1311,7 @@ class utf_normalizer
$utf_sort = array();
}
- $tmp .= UTF8_REPLACEMENT;
+ $tmp .= self::UTF8_REPLACEMENT;
$dump = $sort = 0;
$tmp_pos = $starter_pos = $pos;
@@ -1336,7 +1336,7 @@ class utf_normalizer
$utf_sort = array();
}
- $tmp .= UTF8_REPLACEMENT;
+ $tmp .= self::UTF8_REPLACEMENT;
$dump = $sort = 0;
$tmp_pos = $starter_pos = $pos;
@@ -1361,7 +1361,7 @@ class utf_normalizer
$utf_sort = array();
}
- $tmp .= UTF8_REPLACEMENT;
+ $tmp .= self::UTF8_REPLACEMENT;
$dump = $sort = 0;
$tmp_pos = $starter_pos = $pos;
@@ -1374,12 +1374,12 @@ class utf_normalizer
else
{
// Hangul syllable
- $idx = (((ord($utf_char[0]) & 0x0F) << 12) | ((ord($utf_char[1]) & 0x3F) << 6) | (ord($utf_char[2]) & 0x3F)) - UNICODE_HANGUL_SBASE;
+ $idx = (((ord($utf_char[0]) & 0x0F) << 12) | ((ord($utf_char[1]) & 0x3F) << 6) | (ord($utf_char[2]) & 0x3F)) - self::UNICODE_HANGUL_SBASE;
// LIndex can only range from 0 to 18, therefore it cannot influence the first two bytes of the L Jamo, which allows us to hardcode them (based on LBase).
//
// The same goes for VIndex, but for TIndex there's a catch: the value of the third byte could exceed 0xBF and we would have to increment the second byte
- if ($t_index = $idx % UNICODE_HANGUL_TCOUNT)
+ if ($t_index = $idx % self::UNICODE_HANGUL_TCOUNT)
{
if ($t_index < 25)
{
@@ -1397,8 +1397,8 @@ class utf_normalizer
$utf_char = "\xE1\x84\x00\xE1\x85\x00";
}
- $utf_char[2] = chr(0x80 + (int) ($idx / UNICODE_HANGUL_NCOUNT));
- $utf_char[5] = chr(0xA1 + (int) (($idx % UNICODE_HANGUL_NCOUNT) / UNICODE_HANGUL_TCOUNT));
+ $utf_char[2] = chr(0x80 + (int) ($idx / self::UNICODE_HANGUL_NCOUNT));
+ $utf_char[5] = chr(0xA1 + (int) (($idx % self::UNICODE_HANGUL_NCOUNT) / self::UNICODE_HANGUL_TCOUNT));
// Just like other decompositions, the resulting Jamos must be dumped to the tmp string
$dump = 1;
@@ -1458,11 +1458,11 @@ class utf_normalizer
$dump = $sort = 0;
$tmp_pos = ++$pos;
- $pos += strspn($str, UTF8_ASCII_RANGE, $pos);
+ $pos += strspn($str, self::UTF8_ASCII_RANGE, $pos);
}
else
{
- $pos += strspn($str, UTF8_ASCII_RANGE, ++$pos);
+ $pos += strspn($str, self::UTF8_ASCII_RANGE, ++$pos);
}
$last_cc = 0;
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index b30f28aac9..e2ef3edd0e 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -688,231 +688,6 @@ function utf8_ucfirst($str)
}
/**
-* Recode a string to UTF-8
-*
-* If the encoding is not supported, the string is returned as-is
-*
-* @param string $string Original string
-* @param string $encoding Original encoding (lowered)
-* @return string The string, encoded in UTF-8
-*/
-function utf8_recode($string, $encoding)
-{
- $encoding = strtolower($encoding);
-
- if ($encoding == 'utf-8' || !is_string($string) || empty($string))
- {
- return $string;
- }
-
- // we force iso-8859-1 to be cp1252
- if ($encoding == 'iso-8859-1')
- {
- $encoding = 'cp1252';
- }
- // convert iso-8859-8-i to iso-8859-8
- else if ($encoding == 'iso-8859-8-i')
- {
- $encoding = 'iso-8859-8';
- $string = hebrev($string);
- }
-
- // First, try iconv()
- if (function_exists('iconv'))
- {
- $ret = @iconv($encoding, 'utf-8', $string);
-
- if (!empty($ret))
- {
- return $ret;
- }
- }
-
- // Try the mb_string extension
- if (function_exists('mb_convert_encoding'))
- {
- // mbstring is nasty on PHP4, we must make *sure* that we send a good encoding
- switch ($encoding)
- {
- case 'iso-8859-1':
- case 'iso-8859-2':
- case 'iso-8859-4':
- case 'iso-8859-7':
- case 'iso-8859-9':
- case 'iso-8859-15':
- case 'windows-1251':
- case 'windows-1252':
- case 'cp1252':
- case 'shift_jis':
- case 'euc-kr':
- case 'big5':
- case 'gb2312':
- $ret = @mb_convert_encoding($string, 'utf-8', $encoding);
-
- if (!empty($ret))
- {
- return $ret;
- }
- }
- }
-
- // Try the recode extension
- if (function_exists('recode_string'))
- {
- $ret = @recode_string($encoding . '..utf-8', $string);
-
- if (!empty($ret))
- {
- return $ret;
- }
- }
-
- // If nothing works, check if we have a custom transcoder available
- if (!preg_match('#^[a-z0-9_ \\-]+$#', $encoding))
- {
- // Make sure the encoding name is alphanumeric, we don't want it to be abused into loading arbitrary files
- trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
- }
-
- global $phpbb_root_path, $phpEx;
-
- // iso-8859-* character encoding
- if (preg_match('/iso[_ -]?8859[_ -]?(\\d+)/', $encoding, $array))
- {
- switch ($array[1])
- {
- case '1':
- case '2':
- case '4':
- case '7':
- case '8':
- case '9':
- case '15':
- if (!function_exists('iso_8859_' . $array[1]))
- {
- if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx))
- {
- trigger_error('Basic reencoder file is missing', E_USER_ERROR);
- }
- include($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx);
- }
- return call_user_func('iso_8859_' . $array[1], $string);
- break;
-
- default:
- trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
- break;
- }
- }
-
- // CP/WIN character encoding
- if (preg_match('/(?:cp|windows)[_\- ]?(\\d+)/', $encoding, $array))
- {
- switch ($array[1])
- {
- case '932':
- break;
- case '1250':
- case '1251':
- case '1252':
- case '1254':
- case '1255':
- case '1256':
- case '1257':
- case '874':
- if (!function_exists('cp' . $array[1]))
- {
- if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx))
- {
- trigger_error('Basic reencoder file is missing', E_USER_ERROR);
- }
- include($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx);
- }
- return call_user_func('cp' . $array[1], $string);
- break;
-
- default:
- trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
- break;
- }
- }
-
- // TIS-620
- if (preg_match('/tis[_ -]?620/', $encoding))
- {
- if (!function_exists('tis_620'))
- {
- if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx))
- {
- trigger_error('Basic reencoder file is missing', E_USER_ERROR);
- }
- include($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx);
- }
- return tis_620($string);
- }
-
- // SJIS
- if (preg_match('/sjis(?:[_ -]?win)?|(?:cp|ibm)[_ -]?932|shift[_ -]?jis/', $encoding))
- {
- if (!function_exists('sjis'))
- {
- if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx))
- {
- trigger_error('CJK reencoder file is missing', E_USER_ERROR);
- }
- include($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx);
- }
- return sjis($string);
- }
-
- // EUC_KR
- if (preg_match('/euc[_ -]?kr/', $encoding))
- {
- if (!function_exists('euc_kr'))
- {
- if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx))
- {
- trigger_error('CJK reencoder file is missing', E_USER_ERROR);
- }
- include($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx);
- }
- return euc_kr($string);
- }
-
- // BIG-5
- if (preg_match('/big[_ -]?5/', $encoding))
- {
- if (!function_exists('big5'))
- {
- if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx))
- {
- trigger_error('CJK reencoder file is missing', E_USER_ERROR);
- }
- include($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx);
- }
- return big5($string);
- }
-
- // GB2312
- if (preg_match('/gb[_ -]?2312/', $encoding))
- {
- if (!function_exists('gb2312'))
- {
- if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx))
- {
- trigger_error('CJK reencoder file is missing', E_USER_ERROR);
- }
- include($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx);
- }
- return gb2312($string);
- }
-
- // Trigger an error?! Fow now just give bad data :-(
- trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
- //return $string; // use utf_normalizer::cleanup() ?
-}
-
-/**
* Replace all UTF-8 chars that are not in ASCII with their NCR
*
* @param string $text UTF-8 string in NFC
@@ -1827,7 +1602,7 @@ function utf8_clean_string($text)
$text = utf8_case_fold_nfkc($text);
$text = strtr($text, $homographs);
// Other control characters
- $text = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $text);
+ $text = preg_replace('#[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+#', '', $text);
// we need to reduce multiple spaces to a single one
$text = preg_replace('# {2,}#', ' ', $text);
@@ -1861,7 +1636,7 @@ function utf8_convert_message($message)
}
// else we need to convert some part of the message
- return utf8_htmlspecialchars(utf8_recode($message, 'ISO-8859-1'));
+ return utf8_htmlspecialchars(utf8_encode($message));
}
/**
diff --git a/phpBB/install/data/confusables.php b/phpBB/install/data/confusables.php
deleted file mode 100644
index c543ddfc81..0000000000
--- a/phpBB/install/data/confusables.php
+++ /dev/null
@@ -1,650 +0,0 @@
-<?php
-/**
-*
-* @package install
-* @version $Id$
-* @copyright (c) 2007 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-function utf8_new_case_fold($text, $option = 'full')
-{
- static $uniarray = array();
- global $phpbb_root_path, $phpEx;
-
- // common is always set
- if (!isset($uniarray['c']))
- {
- $uniarray['c'] = include($phpbb_root_path . 'includes/utf/data/case_fold_c.' . $phpEx);
- }
-
- // only set full if we need to
- if ($option === 'full' && !isset($uniarray['f']))
- {
- $uniarray['f'] = include($phpbb_root_path . 'includes/utf/data/case_fold_f.' . $phpEx);
- }
-
- // only set simple if we need to
- if ($option !== 'full' && !isset($uniarray['s']))
- {
- $uniarray['s'] = include($phpbb_root_path . 'includes/utf/data/case_fold_s.' . $phpEx);
- }
-
- // common is always replaced
- $text = strtr($text, $uniarray['c']);
-
- if ($option === 'full')
- {
- // full replaces a character with multiple characters
- $text = strtr($text, $uniarray['f']);
- }
- else
- {
- // simple replaces a character with another character
- $text = strtr($text, $uniarray['s']);
- }
-
- return $text;
-}
-
-function utf8_new_case_fold_nfkc($text, $option = 'full')
-{
- static $fc_nfkc_closure = array(
- "\xCD\xBA" => "\x20\xCE\xB9",
- "\xCF\x92" => "\xCF\x85",
- "\xCF\x93" => "\xCF\x8D",
- "\xCF\x94" => "\xCF\x8B",
- "\xCF\xB2" => "\xCF\x83",
- "\xCF\xB9" => "\xCF\x83",
- "\xE1\xB4\xAC" => "\x61",
- "\xE1\xB4\xAD" => "\xC3\xA6",
- "\xE1\xB4\xAE" => "\x62",
- "\xE1\xB4\xB0" => "\x64",
- "\xE1\xB4\xB1" => "\x65",
- "\xE1\xB4\xB2" => "\xC7\x9D",
- "\xE1\xB4\xB3" => "\x67",
- "\xE1\xB4\xB4" => "\x68",
- "\xE1\xB4\xB5" => "\x69",
- "\xE1\xB4\xB6" => "\x6A",
- "\xE1\xB4\xB7" => "\x6B",
- "\xE1\xB4\xB8" => "\x6C",
- "\xE1\xB4\xB9" => "\x6D",
- "\xE1\xB4\xBA" => "\x6E",
- "\xE1\xB4\xBC" => "\x6F",
- "\xE1\xB4\xBD" => "\xC8\xA3",
- "\xE1\xB4\xBE" => "\x70",
- "\xE1\xB4\xBF" => "\x72",
- "\xE1\xB5\x80" => "\x74",
- "\xE1\xB5\x81" => "\x75",
- "\xE1\xB5\x82" => "\x77",
- "\xE2\x82\xA8" => "\x72\x73",
- "\xE2\x84\x82" => "\x63",
- "\xE2\x84\x83" => "\xC2\xB0\x63",
- "\xE2\x84\x87" => "\xC9\x9B",
- "\xE2\x84\x89" => "\xC2\xB0\x66",
- "\xE2\x84\x8B" => "\x68",
- "\xE2\x84\x8C" => "\x68",
- "\xE2\x84\x8D" => "\x68",
- "\xE2\x84\x90" => "\x69",
- "\xE2\x84\x91" => "\x69",
- "\xE2\x84\x92" => "\x6C",
- "\xE2\x84\x95" => "\x6E",
- "\xE2\x84\x96" => "\x6E\x6F",
- "\xE2\x84\x99" => "\x70",
- "\xE2\x84\x9A" => "\x71",
- "\xE2\x84\x9B" => "\x72",
- "\xE2\x84\x9C" => "\x72",
- "\xE2\x84\x9D" => "\x72",
- "\xE2\x84\xA0" => "\x73\x6D",
- "\xE2\x84\xA1" => "\x74\x65\x6C",
- "\xE2\x84\xA2" => "\x74\x6D",
- "\xE2\x84\xA4" => "\x7A",
- "\xE2\x84\xA8" => "\x7A",
- "\xE2\x84\xAC" => "\x62",
- "\xE2\x84\xAD" => "\x63",
- "\xE2\x84\xB0" => "\x65",
- "\xE2\x84\xB1" => "\x66",
- "\xE2\x84\xB3" => "\x6D",
- "\xE2\x84\xBB" => "\x66\x61\x78",
- "\xE2\x84\xBE" => "\xCE\xB3",
- "\xE2\x84\xBF" => "\xCF\x80",
- "\xE2\x85\x85" => "\x64",
- "\xE3\x89\x90" => "\x70\x74\x65",
- "\xE3\x8B\x8C" => "\x68\x67",
- "\xE3\x8B\x8E" => "\x65\x76",
- "\xE3\x8B\x8F" => "\x6C\x74\x64",
- "\xE3\x8D\xB1" => "\x68\x70\x61",
- "\xE3\x8D\xB3" => "\x61\x75",
- "\xE3\x8D\xB5" => "\x6F\x76",
- "\xE3\x8D\xBA" => "\x69\x75",
- "\xE3\x8E\x80" => "\x70\x61",
- "\xE3\x8E\x81" => "\x6E\x61",
- "\xE3\x8E\x82" => "\xCE\xBC\x61",
- "\xE3\x8E\x83" => "\x6D\x61",
- "\xE3\x8E\x84" => "\x6B\x61",
- "\xE3\x8E\x85" => "\x6B\x62",
- "\xE3\x8E\x86" => "\x6D\x62",
- "\xE3\x8E\x87" => "\x67\x62",
- "\xE3\x8E\x8A" => "\x70\x66",
- "\xE3\x8E\x8B" => "\x6E\x66",
- "\xE3\x8E\x8C" => "\xCE\xBC\x66",
- "\xE3\x8E\x90" => "\x68\x7A",
- "\xE3\x8E\x91" => "\x6B\x68\x7A",
- "\xE3\x8E\x92" => "\x6D\x68\x7A",
- "\xE3\x8E\x93" => "\x67\x68\x7A",
- "\xE3\x8E\x94" => "\x74\x68\x7A",
- "\xE3\x8E\xA9" => "\x70\x61",
- "\xE3\x8E\xAA" => "\x6B\x70\x61",
- "\xE3\x8E\xAB" => "\x6D\x70\x61",
- "\xE3\x8E\xAC" => "\x67\x70\x61",
- "\xE3\x8E\xB4" => "\x70\x76",
- "\xE3\x8E\xB5" => "\x6E\x76",
- "\xE3\x8E\xB6" => "\xCE\xBC\x76",
- "\xE3\x8E\xB7" => "\x6D\x76",
- "\xE3\x8E\xB8" => "\x6B\x76",
- "\xE3\x8E\xB9" => "\x6D\x76",
- "\xE3\x8E\xBA" => "\x70\x77",
- "\xE3\x8E\xBB" => "\x6E\x77",
- "\xE3\x8E\xBC" => "\xCE\xBC\x77",
- "\xE3\x8E\xBD" => "\x6D\x77",
- "\xE3\x8E\xBE" => "\x6B\x77",
- "\xE3\x8E\xBF" => "\x6D\x77",
- "\xE3\x8F\x80" => "\x6B\xCF\x89",
- "\xE3\x8F\x81" => "\x6D\xCF\x89",
- "\xE3\x8F\x83" => "\x62\x71",
- "\xE3\x8F\x86" => "\x63\xE2\x88\x95\x6B\x67",
- "\xE3\x8F\x87" => "\x63\x6F\x2E",
- "\xE3\x8F\x88" => "\x64\x62",
- "\xE3\x8F\x89" => "\x67\x79",
- "\xE3\x8F\x8B" => "\x68\x70",
- "\xE3\x8F\x8D" => "\x6B\x6B",
- "\xE3\x8F\x8E" => "\x6B\x6D",
- "\xE3\x8F\x97" => "\x70\x68",
- "\xE3\x8F\x99" => "\x70\x70\x6D",
- "\xE3\x8F\x9A" => "\x70\x72",
- "\xE3\x8F\x9C" => "\x73\x76",
- "\xE3\x8F\x9D" => "\x77\x62",
- "\xE3\x8F\x9E" => "\x76\xE2\x88\x95\x6D",
- "\xE3\x8F\x9F" => "\x61\xE2\x88\x95\x6D",
- "\xF0\x9D\x90\x80" => "\x61",
- "\xF0\x9D\x90\x81" => "\x62",
- "\xF0\x9D\x90\x82" => "\x63",
- "\xF0\x9D\x90\x83" => "\x64",
- "\xF0\x9D\x90\x84" => "\x65",
- "\xF0\x9D\x90\x85" => "\x66",
- "\xF0\x9D\x90\x86" => "\x67",
- "\xF0\x9D\x90\x87" => "\x68",
- "\xF0\x9D\x90\x88" => "\x69",
- "\xF0\x9D\x90\x89" => "\x6A",
- "\xF0\x9D\x90\x8A" => "\x6B",
- "\xF0\x9D\x90\x8B" => "\x6C",
- "\xF0\x9D\x90\x8C" => "\x6D",
- "\xF0\x9D\x90\x8D" => "\x6E",
- "\xF0\x9D\x90\x8E" => "\x6F",
- "\xF0\x9D\x90\x8F" => "\x70",
- "\xF0\x9D\x90\x90" => "\x71",
- "\xF0\x9D\x90\x91" => "\x72",
- "\xF0\x9D\x90\x92" => "\x73",
- "\xF0\x9D\x90\x93" => "\x74",
- "\xF0\x9D\x90\x94" => "\x75",
- "\xF0\x9D\x90\x95" => "\x76",
- "\xF0\x9D\x90\x96" => "\x77",
- "\xF0\x9D\x90\x97" => "\x78",
- "\xF0\x9D\x90\x98" => "\x79",
- "\xF0\x9D\x90\x99" => "\x7A",
- "\xF0\x9D\x90\xB4" => "\x61",
- "\xF0\x9D\x90\xB5" => "\x62",
- "\xF0\x9D\x90\xB6" => "\x63",
- "\xF0\x9D\x90\xB7" => "\x64",
- "\xF0\x9D\x90\xB8" => "\x65",
- "\xF0\x9D\x90\xB9" => "\x66",
- "\xF0\x9D\x90\xBA" => "\x67",
- "\xF0\x9D\x90\xBB" => "\x68",
- "\xF0\x9D\x90\xBC" => "\x69",
- "\xF0\x9D\x90\xBD" => "\x6A",
- "\xF0\x9D\x90\xBE" => "\x6B",
- "\xF0\x9D\x90\xBF" => "\x6C",
- "\xF0\x9D\x91\x80" => "\x6D",
- "\xF0\x9D\x91\x81" => "\x6E",
- "\xF0\x9D\x91\x82" => "\x6F",
- "\xF0\x9D\x91\x83" => "\x70",
- "\xF0\x9D\x91\x84" => "\x71",
- "\xF0\x9D\x91\x85" => "\x72",
- "\xF0\x9D\x91\x86" => "\x73",
- "\xF0\x9D\x91\x87" => "\x74",
- "\xF0\x9D\x91\x88" => "\x75",
- "\xF0\x9D\x91\x89" => "\x76",
- "\xF0\x9D\x91\x8A" => "\x77",
- "\xF0\x9D\x91\x8B" => "\x78",
- "\xF0\x9D\x91\x8C" => "\x79",
- "\xF0\x9D\x91\x8D" => "\x7A",
- "\xF0\x9D\x91\xA8" => "\x61",
- "\xF0\x9D\x91\xA9" => "\x62",
- "\xF0\x9D\x91\xAA" => "\x63",
- "\xF0\x9D\x91\xAB" => "\x64",
- "\xF0\x9D\x91\xAC" => "\x65",
- "\xF0\x9D\x91\xAD" => "\x66",
- "\xF0\x9D\x91\xAE" => "\x67",
- "\xF0\x9D\x91\xAF" => "\x68",
- "\xF0\x9D\x91\xB0" => "\x69",
- "\xF0\x9D\x91\xB1" => "\x6A",
- "\xF0\x9D\x91\xB2" => "\x6B",
- "\xF0\x9D\x91\xB3" => "\x6C",
- "\xF0\x9D\x91\xB4" => "\x6D",
- "\xF0\x9D\x91\xB5" => "\x6E",
- "\xF0\x9D\x91\xB6" => "\x6F",
- "\xF0\x9D\x91\xB7" => "\x70",
- "\xF0\x9D\x91\xB8" => "\x71",
- "\xF0\x9D\x91\xB9" => "\x72",
- "\xF0\x9D\x91\xBA" => "\x73",
- "\xF0\x9D\x91\xBB" => "\x74",
- "\xF0\x9D\x91\xBC" => "\x75",
- "\xF0\x9D\x91\xBD" => "\x76",
- "\xF0\x9D\x91\xBE" => "\x77",
- "\xF0\x9D\x91\xBF" => "\x78",
- "\xF0\x9D\x92\x80" => "\x79",
- "\xF0\x9D\x92\x81" => "\x7A",
- "\xF0\x9D\x92\x9C" => "\x61",
- "\xF0\x9D\x92\x9E" => "\x63",
- "\xF0\x9D\x92\x9F" => "\x64",
- "\xF0\x9D\x92\xA2" => "\x67",
- "\xF0\x9D\x92\xA5" => "\x6A",
- "\xF0\x9D\x92\xA6" => "\x6B",
- "\xF0\x9D\x92\xA9" => "\x6E",
- "\xF0\x9D\x92\xAA" => "\x6F",
- "\xF0\x9D\x92\xAB" => "\x70",
- "\xF0\x9D\x92\xAC" => "\x71",
- "\xF0\x9D\x92\xAE" => "\x73",
- "\xF0\x9D\x92\xAF" => "\x74",
- "\xF0\x9D\x92\xB0" => "\x75",
- "\xF0\x9D\x92\xB1" => "\x76",
- "\xF0\x9D\x92\xB2" => "\x77",
- "\xF0\x9D\x92\xB3" => "\x78",
- "\xF0\x9D\x92\xB4" => "\x79",
- "\xF0\x9D\x92\xB5" => "\x7A",
- "\xF0\x9D\x93\x90" => "\x61",
- "\xF0\x9D\x93\x91" => "\x62",
- "\xF0\x9D\x93\x92" => "\x63",
- "\xF0\x9D\x93\x93" => "\x64",
- "\xF0\x9D\x93\x94" => "\x65",
- "\xF0\x9D\x93\x95" => "\x66",
- "\xF0\x9D\x93\x96" => "\x67",
- "\xF0\x9D\x93\x97" => "\x68",
- "\xF0\x9D\x93\x98" => "\x69",
- "\xF0\x9D\x93\x99" => "\x6A",
- "\xF0\x9D\x93\x9A" => "\x6B",
- "\xF0\x9D\x93\x9B" => "\x6C",
- "\xF0\x9D\x93\x9C" => "\x6D",
- "\xF0\x9D\x93\x9D" => "\x6E",
- "\xF0\x9D\x93\x9E" => "\x6F",
- "\xF0\x9D\x93\x9F" => "\x70",
- "\xF0\x9D\x93\xA0" => "\x71",
- "\xF0\x9D\x93\xA1" => "\x72",
- "\xF0\x9D\x93\xA2" => "\x73",
- "\xF0\x9D\x93\xA3" => "\x74",
- "\xF0\x9D\x93\xA4" => "\x75",
- "\xF0\x9D\x93\xA5" => "\x76",
- "\xF0\x9D\x93\xA6" => "\x77",
- "\xF0\x9D\x93\xA7" => "\x78",
- "\xF0\x9D\x93\xA8" => "\x79",
- "\xF0\x9D\x93\xA9" => "\x7A",
- "\xF0\x9D\x94\x84" => "\x61",
- "\xF0\x9D\x94\x85" => "\x62",
- "\xF0\x9D\x94\x87" => "\x64",
- "\xF0\x9D\x94\x88" => "\x65",
- "\xF0\x9D\x94\x89" => "\x66",
- "\xF0\x9D\x94\x8A" => "\x67",
- "\xF0\x9D\x94\x8D" => "\x6A",
- "\xF0\x9D\x94\x8E" => "\x6B",
- "\xF0\x9D\x94\x8F" => "\x6C",
- "\xF0\x9D\x94\x90" => "\x6D",
- "\xF0\x9D\x94\x91" => "\x6E",
- "\xF0\x9D\x94\x92" => "\x6F",
- "\xF0\x9D\x94\x93" => "\x70",
- "\xF0\x9D\x94\x94" => "\x71",
- "\xF0\x9D\x94\x96" => "\x73",
- "\xF0\x9D\x94\x97" => "\x74",
- "\xF0\x9D\x94\x98" => "\x75",
- "\xF0\x9D\x94\x99" => "\x76",
- "\xF0\x9D\x94\x9A" => "\x77",
- "\xF0\x9D\x94\x9B" => "\x78",
- "\xF0\x9D\x94\x9C" => "\x79",
- "\xF0\x9D\x94\xB8" => "\x61",
- "\xF0\x9D\x94\xB9" => "\x62",
- "\xF0\x9D\x94\xBB" => "\x64",
- "\xF0\x9D\x94\xBC" => "\x65",
- "\xF0\x9D\x94\xBD" => "\x66",
- "\xF0\x9D\x94\xBE" => "\x67",
- "\xF0\x9D\x95\x80" => "\x69",
- "\xF0\x9D\x95\x81" => "\x6A",
- "\xF0\x9D\x95\x82" => "\x6B",
- "\xF0\x9D\x95\x83" => "\x6C",
- "\xF0\x9D\x95\x84" => "\x6D",
- "\xF0\x9D\x95\x86" => "\x6F",
- "\xF0\x9D\x95\x8A" => "\x73",
- "\xF0\x9D\x95\x8B" => "\x74",
- "\xF0\x9D\x95\x8C" => "\x75",
- "\xF0\x9D\x95\x8D" => "\x76",
- "\xF0\x9D\x95\x8E" => "\x77",
- "\xF0\x9D\x95\x8F" => "\x78",
- "\xF0\x9D\x95\x90" => "\x79",
- "\xF0\x9D\x95\xAC" => "\x61",
- "\xF0\x9D\x95\xAD" => "\x62",
- "\xF0\x9D\x95\xAE" => "\x63",
- "\xF0\x9D\x95\xAF" => "\x64",
- "\xF0\x9D\x95\xB0" => "\x65",
- "\xF0\x9D\x95\xB1" => "\x66",
- "\xF0\x9D\x95\xB2" => "\x67",
- "\xF0\x9D\x95\xB3" => "\x68",
- "\xF0\x9D\x95\xB4" => "\x69",
- "\xF0\x9D\x95\xB5" => "\x6A",
- "\xF0\x9D\x95\xB6" => "\x6B",
- "\xF0\x9D\x95\xB7" => "\x6C",
- "\xF0\x9D\x95\xB8" => "\x6D",
- "\xF0\x9D\x95\xB9" => "\x6E",
- "\xF0\x9D\x95\xBA" => "\x6F",
- "\xF0\x9D\x95\xBB" => "\x70",
- "\xF0\x9D\x95\xBC" => "\x71",
- "\xF0\x9D\x95\xBD" => "\x72",
- "\xF0\x9D\x95\xBE" => "\x73",
- "\xF0\x9D\x95\xBF" => "\x74",
- "\xF0\x9D\x96\x80" => "\x75",
- "\xF0\x9D\x96\x81" => "\x76",
- "\xF0\x9D\x96\x82" => "\x77",
- "\xF0\x9D\x96\x83" => "\x78",
- "\xF0\x9D\x96\x84" => "\x79",
- "\xF0\x9D\x96\x85" => "\x7A",
- "\xF0\x9D\x96\xA0" => "\x61",
- "\xF0\x9D\x96\xA1" => "\x62",
- "\xF0\x9D\x96\xA2" => "\x63",
- "\xF0\x9D\x96\xA3" => "\x64",
- "\xF0\x9D\x96\xA4" => "\x65",
- "\xF0\x9D\x96\xA5" => "\x66",
- "\xF0\x9D\x96\xA6" => "\x67",
- "\xF0\x9D\x96\xA7" => "\x68",
- "\xF0\x9D\x96\xA8" => "\x69",
- "\xF0\x9D\x96\xA9" => "\x6A",
- "\xF0\x9D\x96\xAA" => "\x6B",
- "\xF0\x9D\x96\xAB" => "\x6C",
- "\xF0\x9D\x96\xAC" => "\x6D",
- "\xF0\x9D\x96\xAD" => "\x6E",
- "\xF0\x9D\x96\xAE" => "\x6F",
- "\xF0\x9D\x96\xAF" => "\x70",
- "\xF0\x9D\x96\xB0" => "\x71",
- "\xF0\x9D\x96\xB1" => "\x72",
- "\xF0\x9D\x96\xB2" => "\x73",
- "\xF0\x9D\x96\xB3" => "\x74",
- "\xF0\x9D\x96\xB4" => "\x75",
- "\xF0\x9D\x96\xB5" => "\x76",
- "\xF0\x9D\x96\xB6" => "\x77",
- "\xF0\x9D\x96\xB7" => "\x78",
- "\xF0\x9D\x96\xB8" => "\x79",
- "\xF0\x9D\x96\xB9" => "\x7A",
- "\xF0\x9D\x97\x94" => "\x61",
- "\xF0\x9D\x97\x95" => "\x62",
- "\xF0\x9D\x97\x96" => "\x63",
- "\xF0\x9D\x97\x97" => "\x64",
- "\xF0\x9D\x97\x98" => "\x65",
- "\xF0\x9D\x97\x99" => "\x66",
- "\xF0\x9D\x97\x9A" => "\x67",
- "\xF0\x9D\x97\x9B" => "\x68",
- "\xF0\x9D\x97\x9C" => "\x69",
- "\xF0\x9D\x97\x9D" => "\x6A",
- "\xF0\x9D\x97\x9E" => "\x6B",
- "\xF0\x9D\x97\x9F" => "\x6C",
- "\xF0\x9D\x97\xA0" => "\x6D",
- "\xF0\x9D\x97\xA1" => "\x6E",
- "\xF0\x9D\x97\xA2" => "\x6F",
- "\xF0\x9D\x97\xA3" => "\x70",
- "\xF0\x9D\x97\xA4" => "\x71",
- "\xF0\x9D\x97\xA5" => "\x72",
- "\xF0\x9D\x97\xA6" => "\x73",
- "\xF0\x9D\x97\xA7" => "\x74",
- "\xF0\x9D\x97\xA8" => "\x75",
- "\xF0\x9D\x97\xA9" => "\x76",
- "\xF0\x9D\x97\xAA" => "\x77",
- "\xF0\x9D\x97\xAB" => "\x78",
- "\xF0\x9D\x97\xAC" => "\x79",
- "\xF0\x9D\x97\xAD" => "\x7A",
- "\xF0\x9D\x98\x88" => "\x61",
- "\xF0\x9D\x98\x89" => "\x62",
- "\xF0\x9D\x98\x8A" => "\x63",
- "\xF0\x9D\x98\x8B" => "\x64",
- "\xF0\x9D\x98\x8C" => "\x65",
- "\xF0\x9D\x98\x8D" => "\x66",
- "\xF0\x9D\x98\x8E" => "\x67",
- "\xF0\x9D\x98\x8F" => "\x68",
- "\xF0\x9D\x98\x90" => "\x69",
- "\xF0\x9D\x98\x91" => "\x6A",
- "\xF0\x9D\x98\x92" => "\x6B",
- "\xF0\x9D\x98\x93" => "\x6C",
- "\xF0\x9D\x98\x94" => "\x6D",
- "\xF0\x9D\x98\x95" => "\x6E",
- "\xF0\x9D\x98\x96" => "\x6F",
- "\xF0\x9D\x98\x97" => "\x70",
- "\xF0\x9D\x98\x98" => "\x71",
- "\xF0\x9D\x98\x99" => "\x72",
- "\xF0\x9D\x98\x9A" => "\x73",
- "\xF0\x9D\x98\x9B" => "\x74",
- "\xF0\x9D\x98\x9C" => "\x75",
- "\xF0\x9D\x98\x9D" => "\x76",
- "\xF0\x9D\x98\x9E" => "\x77",
- "\xF0\x9D\x98\x9F" => "\x78",
- "\xF0\x9D\x98\xA0" => "\x79",
- "\xF0\x9D\x98\xA1" => "\x7A",
- "\xF0\x9D\x98\xBC" => "\x61",
- "\xF0\x9D\x98\xBD" => "\x62",
- "\xF0\x9D\x98\xBE" => "\x63",
- "\xF0\x9D\x98\xBF" => "\x64",
- "\xF0\x9D\x99\x80" => "\x65",
- "\xF0\x9D\x99\x81" => "\x66",
- "\xF0\x9D\x99\x82" => "\x67",
- "\xF0\x9D\x99\x83" => "\x68",
- "\xF0\x9D\x99\x84" => "\x69",
- "\xF0\x9D\x99\x85" => "\x6A",
- "\xF0\x9D\x99\x86" => "\x6B",
- "\xF0\x9D\x99\x87" => "\x6C",
- "\xF0\x9D\x99\x88" => "\x6D",
- "\xF0\x9D\x99\x89" => "\x6E",
- "\xF0\x9D\x99\x8A" => "\x6F",
- "\xF0\x9D\x99\x8B" => "\x70",
- "\xF0\x9D\x99\x8C" => "\x71",
- "\xF0\x9D\x99\x8D" => "\x72",
- "\xF0\x9D\x99\x8E" => "\x73",
- "\xF0\x9D\x99\x8F" => "\x74",
- "\xF0\x9D\x99\x90" => "\x75",
- "\xF0\x9D\x99\x91" => "\x76",
- "\xF0\x9D\x99\x92" => "\x77",
- "\xF0\x9D\x99\x93" => "\x78",
- "\xF0\x9D\x99\x94" => "\x79",
- "\xF0\x9D\x99\x95" => "\x7A",
- "\xF0\x9D\x99\xB0" => "\x61",
- "\xF0\x9D\x99\xB1" => "\x62",
- "\xF0\x9D\x99\xB2" => "\x63",
- "\xF0\x9D\x99\xB3" => "\x64",
- "\xF0\x9D\x99\xB4" => "\x65",
- "\xF0\x9D\x99\xB5" => "\x66",
- "\xF0\x9D\x99\xB6" => "\x67",
- "\xF0\x9D\x99\xB7" => "\x68",
- "\xF0\x9D\x99\xB8" => "\x69",
- "\xF0\x9D\x99\xB9" => "\x6A",
- "\xF0\x9D\x99\xBA" => "\x6B",
- "\xF0\x9D\x99\xBB" => "\x6C",
- "\xF0\x9D\x99\xBC" => "\x6D",
- "\xF0\x9D\x99\xBD" => "\x6E",
- "\xF0\x9D\x99\xBE" => "\x6F",
- "\xF0\x9D\x99\xBF" => "\x70",
- "\xF0\x9D\x9A\x80" => "\x71",
- "\xF0\x9D\x9A\x81" => "\x72",
- "\xF0\x9D\x9A\x82" => "\x73",
- "\xF0\x9D\x9A\x83" => "\x74",
- "\xF0\x9D\x9A\x84" => "\x75",
- "\xF0\x9D\x9A\x85" => "\x76",
- "\xF0\x9D\x9A\x86" => "\x77",
- "\xF0\x9D\x9A\x87" => "\x78",
- "\xF0\x9D\x9A\x88" => "\x79",
- "\xF0\x9D\x9A\x89" => "\x7A",
- "\xF0\x9D\x9A\xA8" => "\xCE\xB1",
- "\xF0\x9D\x9A\xA9" => "\xCE\xB2",
- "\xF0\x9D\x9A\xAA" => "\xCE\xB3",
- "\xF0\x9D\x9A\xAB" => "\xCE\xB4",
- "\xF0\x9D\x9A\xAC" => "\xCE\xB5",
- "\xF0\x9D\x9A\xAD" => "\xCE\xB6",
- "\xF0\x9D\x9A\xAE" => "\xCE\xB7",
- "\xF0\x9D\x9A\xAF" => "\xCE\xB8",
- "\xF0\x9D\x9A\xB0" => "\xCE\xB9",
- "\xF0\x9D\x9A\xB1" => "\xCE\xBA",
- "\xF0\x9D\x9A\xB2" => "\xCE\xBB",
- "\xF0\x9D\x9A\xB3" => "\xCE\xBC",
- "\xF0\x9D\x9A\xB4" => "\xCE\xBD",
- "\xF0\x9D\x9A\xB5" => "\xCE\xBE",
- "\xF0\x9D\x9A\xB6" => "\xCE\xBF",
- "\xF0\x9D\x9A\xB7" => "\xCF\x80",
- "\xF0\x9D\x9A\xB8" => "\xCF\x81",
- "\xF0\x9D\x9A\xB9" => "\xCE\xB8",
- "\xF0\x9D\x9A\xBA" => "\xCF\x83",
- "\xF0\x9D\x9A\xBB" => "\xCF\x84",
- "\xF0\x9D\x9A\xBC" => "\xCF\x85",
- "\xF0\x9D\x9A\xBD" => "\xCF\x86",
- "\xF0\x9D\x9A\xBE" => "\xCF\x87",
- "\xF0\x9D\x9A\xBF" => "\xCF\x88",
- "\xF0\x9D\x9B\x80" => "\xCF\x89",
- "\xF0\x9D\x9B\x93" => "\xCF\x83",
- "\xF0\x9D\x9B\xA2" => "\xCE\xB1",
- "\xF0\x9D\x9B\xA3" => "\xCE\xB2",
- "\xF0\x9D\x9B\xA4" => "\xCE\xB3",
- "\xF0\x9D\x9B\xA5" => "\xCE\xB4",
- "\xF0\x9D\x9B\xA6" => "\xCE\xB5",
- "\xF0\x9D\x9B\xA7" => "\xCE\xB6",
- "\xF0\x9D\x9B\xA8" => "\xCE\xB7",
- "\xF0\x9D\x9B\xA9" => "\xCE\xB8",
- "\xF0\x9D\x9B\xAA" => "\xCE\xB9",
- "\xF0\x9D\x9B\xAB" => "\xCE\xBA",
- "\xF0\x9D\x9B\xAC" => "\xCE\xBB",
- "\xF0\x9D\x9B\xAD" => "\xCE\xBC",
- "\xF0\x9D\x9B\xAE" => "\xCE\xBD",
- "\xF0\x9D\x9B\xAF" => "\xCE\xBE",
- "\xF0\x9D\x9B\xB0" => "\xCE\xBF",
- "\xF0\x9D\x9B\xB1" => "\xCF\x80",
- "\xF0\x9D\x9B\xB2" => "\xCF\x81",
- "\xF0\x9D\x9B\xB3" => "\xCE\xB8",
- "\xF0\x9D\x9B\xB4" => "\xCF\x83",
- "\xF0\x9D\x9B\xB5" => "\xCF\x84",
- "\xF0\x9D\x9B\xB6" => "\xCF\x85",
- "\xF0\x9D\x9B\xB7" => "\xCF\x86",
- "\xF0\x9D\x9B\xB8" => "\xCF\x87",
- "\xF0\x9D\x9B\xB9" => "\xCF\x88",
- "\xF0\x9D\x9B\xBA" => "\xCF\x89",
- "\xF0\x9D\x9C\x8D" => "\xCF\x83",
- "\xF0\x9D\x9C\x9C" => "\xCE\xB1",
- "\xF0\x9D\x9C\x9D" => "\xCE\xB2",
- "\xF0\x9D\x9C\x9E" => "\xCE\xB3",
- "\xF0\x9D\x9C\x9F" => "\xCE\xB4",
- "\xF0\x9D\x9C\xA0" => "\xCE\xB5",
- "\xF0\x9D\x9C\xA1" => "\xCE\xB6",
- "\xF0\x9D\x9C\xA2" => "\xCE\xB7",
- "\xF0\x9D\x9C\xA3" => "\xCE\xB8",
- "\xF0\x9D\x9C\xA4" => "\xCE\xB9",
- "\xF0\x9D\x9C\xA5" => "\xCE\xBA",
- "\xF0\x9D\x9C\xA6" => "\xCE\xBB",
- "\xF0\x9D\x9C\xA7" => "\xCE\xBC",
- "\xF0\x9D\x9C\xA8" => "\xCE\xBD",
- "\xF0\x9D\x9C\xA9" => "\xCE\xBE",
- "\xF0\x9D\x9C\xAA" => "\xCE\xBF",
- "\xF0\x9D\x9C\xAB" => "\xCF\x80",
- "\xF0\x9D\x9C\xAC" => "\xCF\x81",
- "\xF0\x9D\x9C\xAD" => "\xCE\xB8",
- "\xF0\x9D\x9C\xAE" => "\xCF\x83",
- "\xF0\x9D\x9C\xAF" => "\xCF\x84",
- "\xF0\x9D\x9C\xB0" => "\xCF\x85",
- "\xF0\x9D\x9C\xB1" => "\xCF\x86",
- "\xF0\x9D\x9C\xB2" => "\xCF\x87",
- "\xF0\x9D\x9C\xB3" => "\xCF\x88",
- "\xF0\x9D\x9C\xB4" => "\xCF\x89",
- "\xF0\x9D\x9D\x87" => "\xCF\x83",
- "\xF0\x9D\x9D\x96" => "\xCE\xB1",
- "\xF0\x9D\x9D\x97" => "\xCE\xB2",
- "\xF0\x9D\x9D\x98" => "\xCE\xB3",
- "\xF0\x9D\x9D\x99" => "\xCE\xB4",
- "\xF0\x9D\x9D\x9A" => "\xCE\xB5",
- "\xF0\x9D\x9D\x9B" => "\xCE\xB6",
- "\xF0\x9D\x9D\x9C" => "\xCE\xB7",
- "\xF0\x9D\x9D\x9D" => "\xCE\xB8",
- "\xF0\x9D\x9D\x9E" => "\xCE\xB9",
- "\xF0\x9D\x9D\x9F" => "\xCE\xBA",
- "\xF0\x9D\x9D\xA0" => "\xCE\xBB",
- "\xF0\x9D\x9D\xA1" => "\xCE\xBC",
- "\xF0\x9D\x9D\xA2" => "\xCE\xBD",
- "\xF0\x9D\x9D\xA3" => "\xCE\xBE",
- "\xF0\x9D\x9D\xA4" => "\xCE\xBF",
- "\xF0\x9D\x9D\xA5" => "\xCF\x80",
- "\xF0\x9D\x9D\xA6" => "\xCF\x81",
- "\xF0\x9D\x9D\xA7" => "\xCE\xB8",
- "\xF0\x9D\x9D\xA8" => "\xCF\x83",
- "\xF0\x9D\x9D\xA9" => "\xCF\x84",
- "\xF0\x9D\x9D\xAA" => "\xCF\x85",
- "\xF0\x9D\x9D\xAB" => "\xCF\x86",
- "\xF0\x9D\x9D\xAC" => "\xCF\x87",
- "\xF0\x9D\x9D\xAD" => "\xCF\x88",
- "\xF0\x9D\x9D\xAE" => "\xCF\x89",
- "\xF0\x9D\x9E\x81" => "\xCF\x83",
- "\xF0\x9D\x9E\x90" => "\xCE\xB1",
- "\xF0\x9D\x9E\x91" => "\xCE\xB2",
- "\xF0\x9D\x9E\x92" => "\xCE\xB3",
- "\xF0\x9D\x9E\x93" => "\xCE\xB4",
- "\xF0\x9D\x9E\x94" => "\xCE\xB5",
- "\xF0\x9D\x9E\x95" => "\xCE\xB6",
- "\xF0\x9D\x9E\x96" => "\xCE\xB7",
- "\xF0\x9D\x9E\x97" => "\xCE\xB8",
- "\xF0\x9D\x9E\x98" => "\xCE\xB9",
- "\xF0\x9D\x9E\x99" => "\xCE\xBA",
- "\xF0\x9D\x9E\x9A" => "\xCE\xBB",
- "\xF0\x9D\x9E\x9B" => "\xCE\xBC",
- "\xF0\x9D\x9E\x9C" => "\xCE\xBD",
- "\xF0\x9D\x9E\x9D" => "\xCE\xBE",
- "\xF0\x9D\x9E\x9E" => "\xCE\xBF",
- "\xF0\x9D\x9E\x9F" => "\xCF\x80",
- "\xF0\x9D\x9E\xA0" => "\xCF\x81",
- "\xF0\x9D\x9E\xA1" => "\xCE\xB8",
- "\xF0\x9D\x9E\xA2" => "\xCF\x83",
- "\xF0\x9D\x9E\xA3" => "\xCF\x84",
- "\xF0\x9D\x9E\xA4" => "\xCF\x85",
- "\xF0\x9D\x9E\xA5" => "\xCF\x86",
- "\xF0\x9D\x9E\xA6" => "\xCF\x87",
- "\xF0\x9D\x9E\xA7" => "\xCF\x88",
- "\xF0\x9D\x9E\xA8" => "\xCF\x89",
- "\xF0\x9D\x9E\xBB" => "\xCF\x83",
- "\xF0\x9D\x9F\x8A" => "\xCF\x9D",
- );
- global $phpbb_root_path, $phpEx;
-
- // do the case fold
- $text = utf8_new_case_fold($text, $option);
-
- if (!class_exists('utf_normalizer'))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
- }
-
- // convert to NFKC
- utf_new_normalizer::nfkc($text);
-
- // FC_NFKC_Closure, http://www.unicode.org/Public/5.0.0/ucd/DerivedNormalizationProps.txt
- $text = strtr($text, $fc_nfkc_closure);
-
- return $text;
-}
-
-return array('¡'=>'i','ǃ'=>'!','α'=>'a',' '=>' ','­'=>'','۝'=>'','܏'=>'','᠆'=>'','᠎'=>'','​'=>'','‌'=>'','‍'=>'','
'=>'','
'=>'','⁠'=>'','⁡'=>'','⁢'=>'','⁣'=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'','𝅳'=>'','𝅴'=>'','𝅵'=>'','𝅶'=>'','𝅷'=>'','𝅸'=>'','𝅹'=>'','𝅺'=>'','۬'=>'۟','̓'=>'̓','ُ'=>'̓','֜'=>'́','́'=>'́','݇'=>'́','॔'=>'́','̀'=>'̀','॓'=>'̀','̌'=>'̆','̑'=>'̂','֯'=>'̊','ஂ'=>'̊','ํ'=>'̊','ໍ'=>'̊','ံ'=>'̊','ំ'=>'̊','៓'=>'̊','゚'=>'̊','゚'=>'̊','ͦ'=>'̊','͂'=>'̃','ׄ'=>'̇','ֹ'=>'̇','ׂ'=>'̇','ׁ'=>'̇','݁'=>'̇','ं'=>'̇','ਂ'=>'̇','ં'=>'̇','்'=>'̇','̅'=>'̄','〬'=>'̉','̱'=>'̠','॒'=>'̠','̧'=>'̡','̦'=>'̡','̨'=>'̢','़'=>'̣','়'=>'̣','਼'=>'̣','઼'=>'̣','଼'=>'̣','͇'=>'̳','̶'=>'̵','ﱞ'=>'ﹲّ','ﱟ'=>'ﹴّ','ﳲ'=>'ﹷّ','ﱠ'=>'ﹶّ','ﳳ'=>'ﹹّ','ﱡ'=>'ﹸّ','ﳴ'=>'ﹻّ','ﱢ'=>'ﹺّ','ﱣ'=>'ﹼٰ','ٴ'=>'ٔ','݂'=>'ܼ','౦'=>'o','೦'=>'o','゙'=>'゙',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ','`'=>'`','`'=>'`','῀'=>'˜','^'=>'^','︿'=>'^','_'=>'_','﹍'=>'_','﹎'=>'_','﹏'=>'_','⌇'=>'︴','-'=>'-','‐'=>'-','‑'=>'-','‒'=>'-','–'=>'-','﹘'=>'-','∼'=>'⁓','・'=>'・','•'=>'・',','=>',','‚'=>',','٬'=>'،','、'=>'、',';'=>';',';'=>';',':'=>':','։'=>':','︰'=>':','׃'=>':','⩴'=>'::=','.'=>'.','․'=>'.','܂'=>'.','‥'=>'..','…'=>'...','。'=>'。','·'=>'·','‧'=>'·','∙'=>'·','⋅'=>'·','ᐧ'=>'·','ᔯ'=>'·4','ᐌ'=>'·ᐁ','ᐎ'=>'·ᐃ','ᐐ'=>'·ᐄ','ᐒ'=>'·ᐅ','ᐔ'=>'·ᐆ','ᐗ'=>'·ᐊ','ᐙ'=>'·ᐋ','ᐷ'=>'·ᐳ','ᑀ'=>'·ᐳ','ᑂ'=>'·ᐴ','ᑄ'=>'·ᐸ','ᑆ'=>'·ᐹ','ᑗ'=>'·ᑌ','ᑙ'=>'·ᑎ','ᑛ'=>'·ᑏ','ᑔ'=>'·ᑐ','ᑝ'=>'·ᑐ','ᑟ'=>'·ᑑ','ᑡ'=>'·ᑕ','ᑣ'=>'·ᑖ','ᑴ'=>'·ᑫ','ᑸ'=>'·ᑮ','ᑼ'=>'·ᑰ','ᑾ'=>'·ᑲ','ᒀ'=>'·ᑳ','ᒒ'=>'·ᒉ','ᒔ'=>'·ᒋ','ᒖ'=>'·ᒌ','ᒚ'=>'·ᒎ','ᒜ'=>'·ᒐ','ᒞ'=>'·ᒑ','ᒬ'=>'·ᒣ','ᒮ'=>'·ᒥ','ᒰ'=>'·ᒦ','ᒲ'=>'·ᒧ','ᒴ'=>'·ᒨ','ᒶ'=>'·L','ᒸ'=>'·ᒫ','ᓉ'=>'·ᓀ','ᓋ'=>'·ᓇ','ᓍ'=>'·ᓈ','ᓜ'=>'·ᓓ','ᓞ'=>'·ᓕ','ᓠ'=>'·ᓖ','ᓢ'=>'·ᓗ','ᓤ'=>'·ᓘ','ᓦ'=>'·ᓚ','ᓨ'=>'·ᓛ','ᓶ'=>'·ᓭ','ᓸ'=>'·ᓯ','ᓺ'=>'·ᓰ','ᓼ'=>'·ᓱ','ᓾ'=>'·ᓲ','ᔀ'=>'·ᓴ','ᔂ'=>'·ᓵ','ᔗ'=>'·ᔐ','ᔙ'=>'·ᔑ','ᔛ'=>'·ᔒ','ᔝ'=>'·ᔓ','ᔟ'=>'·ᔔ','ᔡ'=>'·ᔕ','ᔣ'=>'·ᔖ','ᔱ'=>'·ᔨ','ᔳ'=>'·ᔩ','ᔵ'=>'·ᔪ','ᔷ'=>'·ᔫ','ᔹ'=>'·ᔭ','ᔻ'=>'·ᔮ','ᕎ'=>'·ᕌ','ᕛ'=>'·ᕚ','ᕨ'=>'·ᕧ','('=>'(','⑴'=>'(1)','⒧'=>'(l)','⑽'=>'(10)','⑾'=>'(11)','⑿'=>'(12)','⒀'=>'(13)','⒁'=>'(14)','⒂'=>'(15)','⒃'=>'(16)','⒄'=>'(17)','⒅'=>'(18)','⒆'=>'(19)','⑵'=>'(2)','⒇'=>'(20)','⑶'=>'(3)','⑷'=>'(4)','⑸'=>'(5)','⑹'=>'(6)','⑺'=>'(7)','⑻'=>'(8)','⑼'=>'(9)','⒜'=>'(a)','⒝'=>'(b)','⒞'=>'(c)','⒟'=>'(d)','⒠'=>'(e)','⒡'=>'(f)','⒢'=>'(g)','⒣'=>'(h)','⒤'=>'(i)','⒥'=>'(j)','⒦'=>'(k)','⒨'=>'(m)','⒩'=>'(n)','⒪'=>'(o)','⒫'=>'(p)','⒬'=>'(q)','⒭'=>'(r)','⒮'=>'(s)','⒯'=>'(t)','⒰'=>'(u)','⒱'=>'(v)','⒲'=>'(w)','⒳'=>'(x)','⒴'=>'(y)','⒵'=>'(z)','㈀'=>'(ᄀ)','㈎'=>'(가)','㈁'=>'(ᄂ)','㈏'=>'(나)','㈂'=>'(ᄃ)','㈐'=>'(다)','㈃'=>'(ᄅ)','㈑'=>'(라)','㈄'=>'(ᄆ)','㈒'=>'(마)','㈅'=>'(ᄇ)','㈓'=>'(바)','㈆'=>'(ᄉ)','㈔'=>'(사)','㈇'=>'(ᄋ)','㈕'=>'(아)','㈝'=>'(오전)','㈞'=>'(오후)','㈈'=>'(ᄌ)','㈖'=>'(자)','㈜'=>'(주)','㈉'=>'(ᄎ)','㈗'=>'(차)','㈊'=>'(ᄏ)','㈘'=>'(카)','㈋'=>'(ᄐ)','㈙'=>'(타)','㈌'=>'(ᄑ)','㈚'=>'(파)','㈍'=>'(ᄒ)','㈛'=>'(하)','㈠'=>'(一)','㈦'=>'(七)','㈢'=>'(三)','㈨'=>'(九)','㈡'=>'(二)','㈤'=>'(五)','㈹'=>'(代)','㈽'=>'(企)','㉁'=>'(休)','㈧'=>'(八)','㈥'=>'(六)','㈸'=>'(労)','㈩'=>'(十)','㈿'=>'(協)','㈴'=>'(名)','㈺'=>'(呼)','㈣'=>'(四)','㈯'=>'(土)','㈻'=>'(学)','㈰'=>'(日)','㈪'=>'(月)','㈲'=>'(有)','㈭'=>'(木)','㈱'=>'(株)','㈬'=>'(水)','㈫'=>'(火)','㈵'=>'(特)','㈼'=>'(監)','㈳'=>'(社)','㈷'=>'(祝)','㉀'=>'(祭)','㉂'=>'(自)','㉃'=>'(至)','㈶'=>'(財)','㈾'=>'(資)','㈮'=>'(金)',')'=>')','['=>'[','〔'=>'[',']'=>']','〕'=>']','{'=>'{','}'=>'}','⦅'=>'⦅','⦆'=>'⦆','「'=>'「','」'=>'」','@'=>'@','*'=>'*','/'=>'/','⁄'=>'/','∕'=>'/','\'=>'\\','&'=>'&','#'=>'#','%'=>'%','‶'=>'‵‵','‷'=>'‵‵‵','༌'=>'་','´'=>'ʹ','΄'=>'ʹ','´'=>'ʹ','\''=>'ʹ','''=>'ʹ','′'=>'ʹ','׳'=>'ʹ','ʹ'=>'ʹ','ˊ'=>'ʹ','"'=>'ʹʹ','"'=>'ʹʹ','″'=>'ʹʹ','〃'=>'ʹʹ','״'=>'ʹʹ','ʺ'=>'ʹʹ','‴'=>'ʹʹʹ','⁗'=>'ʹʹʹʹ','¯'=>'ˉ',' ̄'=>'ˉ','‾'=>'ˉ','﹉'=>'ˉ','﹊'=>'ˉ','﹋'=>'ˉ','﹌'=>'ˉ','˚'=>'°','௵'=>'௳','←'=>'←','→'=>'→','↑'=>'↑','↓'=>'↓','↵'=>'↲','⨡'=>'↾','𝛛'=>'∂','𝜕'=>'∂','𝝏'=>'∂','𝞉'=>'∂','𝟃'=>'∂','𝛁'=>'∇','𝛻'=>'∇','𝜵'=>'∇','𝝯'=>'∇','𝞩'=>'∇','+'=>'+','﬩'=>'+','‹'=>'<','<'=>'<','='=>'=','⩵'=>'==','⩶'=>'===','›'=>'>','>'=>'>','¬'=>'¬','¦'=>'¦','〜'=>'~','~'=>'~','﹨'=>'∖','⋀'=>'∧','⋁'=>'∨','⋂'=>'∩','⋃'=>'∪','∯'=>'∮∮','∰'=>'∮∮∮','≣'=>'≡','♁'=>'⊕','☉'=>'⊙','⟂'=>'⊥','▷'=>'⊲','⨝'=>'⋈','⨽'=>'⌙','☸'=>'⎈','⎮'=>'⎥','│'=>'│','▐'=>'▌','■'=>'■','☐'=>'□','○'=>'○','⦾'=>'◎','〛'=>'⟧','〈'=>'⟨','〈'=>'⟨','〉'=>'⟩','〉'=>'⟩','⧙'=>'⦚','〶'=>'〒','ー'=>'ー','¢'=>'¢','$'=>'$','£'=>'£','¥'=>'Y̵','₩'=>'W̵','0'=>'0','𝟎'=>'0','𝟘'=>'0','𝟢'=>'0','𝟬'=>'0','𝟶'=>'0','০'=>'0','୦'=>'0','௦'=>'0','᠐'=>'0','〇'=>'0','𝐎'=>'0','𝑂'=>'0','𝑶'=>'0','𝒪'=>'0','𝓞'=>'0','𝔒'=>'0','𝕆'=>'0','𝕺'=>'0','𝖮'=>'0','𝗢'=>'0','𝘖'=>'0','𝙊'=>'0','𝙾'=>'0','𝚶'=>'0','𝛰'=>'0','𝜪'=>'0','𝝤'=>'0','𝞞'=>'0','ⵔ'=>'0','ഠ'=>'0','⊖'=>'0̵','𝚯'=>'0̵','𝚹'=>'0̵','𝛩'=>'0̵','𝛳'=>'0̵','𝜣'=>'0̵','𝜭'=>'0̵','𝝝'=>'0̵','𝝧'=>'0̵','𝞗'=>'0̵','𝞡'=>'0̵','ⴱ'=>'0̵','Ꮎ'=>'0̵','۰'=>'٠','᭜'=>'᭐','㍘'=>'0点','1'=>'1','𝟏'=>'1','𝟙'=>'1','𝟣'=>'1','𝟭'=>'1','𝟷'=>'1','ℐ'=>'1','ℑ'=>'1','𝐈'=>'1','𝐼'=>'1','𝑰'=>'1','𝓘'=>'1','𝕀'=>'1','𝕴'=>'1','𝖨'=>'1','𝗜'=>'1','𝘐'=>'1','𝙄'=>'1','𝙸'=>'1','l'=>'l','l'=>'l','ⅼ'=>'1','ℓ'=>'l','𝐥'=>'l','𝑙'=>'l','𝒍'=>'l','𝓁'=>'l','𝓵'=>'l','𝔩'=>'l','𝕝'=>'l','𝖑'=>'l','𝗅'=>'l','𝗹'=>'l','𝘭'=>'l','𝙡'=>'l','𝚕'=>'l','𝚰'=>'l','𝛪'=>'l','𝜤'=>'l','𝝞'=>'l','𝞘'=>'l','①'=>'➀','ɭ'=>'l̢','ɫ'=>'l̴','ƚ'=>'l̵','ł'=>'l̷','۱'=>'١','⒈'=>'1.','ŀ'=>'l·','ᒷ'=>'1·','⑩'=>'➉','⒑'=>'10.','㏩'=>'10日','㋉'=>'10月','㍢'=>'10点','⒒'=>'11.','㏪'=>'11日','㋊'=>'11月','㍣'=>'11点','⒓'=>'12.','㏫'=>'12日','㋋'=>'12月','㍤'=>'12点','⒔'=>'13.','㏬'=>'13日','㍥'=>'13点','⒕'=>'14.','㏭'=>'14日','㍦'=>'14点','⒖'=>'15.','㏮'=>'15日','㍧'=>'15点','⒗'=>'16.','㏯'=>'16日','㍨'=>'16点','⒘'=>'17.','㏰'=>'17日','㍩'=>'17点','⒙'=>'18.','㏱'=>'18日','㍪'=>'18点','⒚'=>'19.','㏲'=>'19日','㍫'=>'19点','lj'=>'lj','㏠'=>'1日','㋀'=>'1月','㍙'=>'1点','2'=>'2','𝟐'=>'2','𝟚'=>'2','𝟤'=>'2','𝟮'=>'2','𝟸'=>'2','ᒿ'=>'2','②'=>'➁','۲'=>'٢','⒉'=>'2.','⒛'=>'20.','㏳'=>'20日','㍬'=>'20点','㏴'=>'21日','㍭'=>'21点','㏵'=>'22日','㍮'=>'22点','㏶'=>'23日','㍯'=>'23点','㏷'=>'24日','㍰'=>'24点','㏸'=>'25日','㏹'=>'26日','㏺'=>'27日','㏻'=>'28日','㏼'=>'29日','㏡'=>'2日','㋁'=>'2月','㍚'=>'2点','3'=>'3','𝟑'=>'3','𝟛'=>'3','𝟥'=>'3','𝟯'=>'3','𝟹'=>'3','③'=>'➂','۳'=>'٣','⒊'=>'3.','㏽'=>'30日','㏾'=>'31日','㏢'=>'3日','㋂'=>'3月','㍛'=>'3点','4'=>'4','𝟒'=>'4','𝟜'=>'4','𝟦'=>'4','𝟰'=>'4','𝟺'=>'4','Ꮞ'=>'4','④'=>'➃','⒋'=>'4.','ᔰ'=>'4·','㏣'=>'4日','㋃'=>'4月','㍜'=>'4点','5'=>'5','𝟓'=>'5','𝟝'=>'5','𝟧'=>'5','𝟱'=>'5','𝟻'=>'5','⑤'=>'➄','⒌'=>'5.','㏤'=>'5日','㋄'=>'5月','㍝'=>'5点','6'=>'6','𝟔'=>'6','𝟞'=>'6','𝟨'=>'6','𝟲'=>'6','𝟼'=>'6','б'=>'6','⑥'=>'➅','⒍'=>'6.','㏥'=>'6日','㋅'=>'6月','㍞'=>'6点','7'=>'7','𝟕'=>'7','𝟟'=>'7','𝟩'=>'7','𝟳'=>'7','𝟽'=>'7','⑦'=>'➆','۷'=>'٧','⒎'=>'7.','㏦'=>'7日','㋆'=>'7月','㍟'=>'7点','ଃ'=>'8','৪'=>'8','੪'=>'8','8'=>'8','𝟖'=>'8','𝟠'=>'8','𝟪'=>'8','𝟴'=>'8','𝟾'=>'8','ȣ'=>'8','⑧'=>'➇','۸'=>'٨','⒏'=>'8.','㏧'=>'8日','㋇'=>'8月','㍠'=>'8点','੧'=>'9','୨'=>'9','৭'=>'9','9'=>'9','𝟗'=>'9','𝟡'=>'9','𝟫'=>'9','𝟵'=>'9','𝟿'=>'9','⑨'=>'➈','۹'=>'٩','⒐'=>'9.','㏨'=>'9日','㋈'=>'9月','㍡'=>'9点','a'=>'a','𝐚'=>'a','𝑎'=>'a','𝒂'=>'a','𝒶'=>'a','𝓪'=>'a','𝔞'=>'a','𝕒'=>'a','𝖆'=>'a','𝖺'=>'a','𝗮'=>'a','𝘢'=>'a','𝙖'=>'a','𝚊'=>'a','℀'=>'a/c','℁'=>'a/s','æ'=>'ae','b'=>'b','𝐛'=>'b','𝑏'=>'b','𝒃'=>'b','𝒷'=>'b','𝓫'=>'b','𝔟'=>'b','𝕓'=>'b','𝖇'=>'b','𝖻'=>'b','𝗯'=>'b','𝘣'=>'b','𝙗'=>'b','𝚋'=>'b','ɓ'=>'b̔','ƃ'=>'b̄','ƀ'=>'b̵','c'=>'c','ⅽ'=>'c','𝐜'=>'c','𝑐'=>'c','𝒄'=>'c','𝒸'=>'c','𝓬'=>'c','𝔠'=>'c','𝕔'=>'c','𝖈'=>'c','𝖼'=>'c','𝗰'=>'c','𝘤'=>'c','𝙘'=>'c','𝚌'=>'c','𝛓'=>'c','𝜍'=>'c','𝝇'=>'c','𝞁'=>'c','𝞻'=>'c','℅'=>'c/o','℆'=>'c/u','d'=>'d','ⅾ'=>'d','ⅆ'=>'d','𝐝'=>'d','𝑑'=>'d','𝒅'=>'d','𝒹'=>'d','𝓭'=>'d','𝔡'=>'d','𝕕'=>'d','𝖉'=>'d','𝖽'=>'d','𝗱'=>'d','𝘥'=>'d','𝙙'=>'d','𝚍'=>'d','ɗ'=>'d̔','ƌ'=>'d̄','ɖ'=>'d̢','đ'=>'d̵','dz'=>'dz','dž'=>'dž','e'=>'e','ℯ'=>'e','ⅇ'=>'e','𝐞'=>'e','𝑒'=>'e','𝒆'=>'e','𝓮'=>'e','𝔢'=>'e','𝕖'=>'e','𝖊'=>'e','𝖾'=>'e','𝗲'=>'e','𝘦'=>'e','𝙚'=>'e','𝚎'=>'e','ⴹ'=>'E','ə'=>'ǝ','ɚ'=>'ǝ˞','⋴'=>'ɛ','𝛆'=>'ɛ','𝛜'=>'ɛ','𝜀'=>'ɛ','𝜖'=>'ɛ','𝜺'=>'ɛ','𝝐'=>'ɛ','𝝴'=>'ɛ','𝞊'=>'ɛ','𝞮'=>'ɛ','𝟄'=>'ɛ','f'=>'f','𝐟'=>'f','𝑓'=>'f','𝒇'=>'f','𝒻'=>'f','𝓯'=>'f','𝔣'=>'f','𝕗'=>'f','𝖋'=>'f','𝖿'=>'f','𝗳'=>'f','𝘧'=>'f','𝙛'=>'f','𝚏'=>'f','ƒ'=>'f̡','g'=>'g','ℊ'=>'g','𝐠'=>'g','𝑔'=>'g','𝒈'=>'g','𝓰'=>'g','𝔤'=>'g','𝕘'=>'g','𝖌'=>'g','𝗀'=>'g','𝗴'=>'g','𝘨'=>'g','𝙜'=>'g','𝚐'=>'g','ɡ'=>'g','ɠ'=>'g̔','ǥ'=>'g̵','h'=>'h','ℎ'=>'h','𝐡'=>'h','𝒉'=>'h','𝒽'=>'h','𝓱'=>'h','𝔥'=>'h','𝕙'=>'h','𝖍'=>'h','𝗁'=>'h','𝗵'=>'h','𝘩'=>'h','𝙝'=>'h','𝚑'=>'h','ɦ'=>'h̔','ħ'=>'h̵','ℏ'=>'h̵','῾'=>'ʻ','‘'=>'ʻ','‛'=>'ʻ','ʽ'=>'ʻ','⍳'=>'i','i'=>'i','ⅰ'=>'i','ℹ'=>'i','ⅈ'=>'i','𝐢'=>'i','𝑖'=>'i','𝒊'=>'i','𝒾'=>'i','𝓲'=>'i','𝔦'=>'i','𝕚'=>'i','𝖎'=>'i','𝗂'=>'i','𝗶'=>'i','𝘪'=>'i','𝙞'=>'i','𝚒'=>'i','ı'=>'i','𝚤'=>'i','ɪ'=>'i','ɩ'=>'i','𝛊'=>'i','𝜄'=>'i','𝜾'=>'i','𝝸'=>'i','𝞲'=>'i','ɨ'=>'i̵','ⅱ'=>'ii','ⅲ'=>'iii','ij'=>'ij','ⅳ'=>'iv','ⅸ'=>'ix','j'=>'j','ⅉ'=>'j','𝐣'=>'j','𝑗'=>'j','𝒋'=>'j','𝒿'=>'j','𝓳'=>'j','𝔧'=>'j','𝕛'=>'j','𝖏'=>'j','𝗃'=>'j','𝗷'=>'j','𝘫'=>'j','𝙟'=>'j','𝚓'=>'j','ϳ'=>'j','𝚥'=>'ȷ','k'=>'k','𝐤'=>'k','𝑘'=>'k','𝒌'=>'k','𝓀'=>'k','𝓴'=>'k','𝔨'=>'k','𝕜'=>'k','𝖐'=>'k','𝗄'=>'k','𝗸'=>'k','𝘬'=>'k','𝙠'=>'k','𝚔'=>'k','ƙ'=>'k̔','m'=>'m','ⅿ'=>'m','𝐦'=>'m','𝑚'=>'m','𝒎'=>'m','𝓂'=>'m','𝓶'=>'m','𝔪'=>'m','𝕞'=>'m','𝖒'=>'m','𝗆'=>'m','𝗺'=>'m','𝘮'=>'m','𝙢'=>'m','𝚖'=>'m','ɱ'=>'m̡','n'=>'n','𝐧'=>'n','𝑛'=>'n','𝒏'=>'n','𝓃'=>'n','𝓷'=>'n','𝔫'=>'n','𝕟'=>'n','𝖓'=>'n','𝗇'=>'n','𝗻'=>'n','𝘯'=>'n','𝙣'=>'n','𝚗'=>'n','𝐍'=>'N','𝑁'=>'N','𝑵'=>'N','𝒩'=>'N','𝓝'=>'N','𝔑'=>'N','𝕹'=>'N','𝖭'=>'N','𝗡'=>'N','𝘕'=>'N','𝙉'=>'N','𝙽'=>'N','𝚴'=>'N','𝛮'=>'N','𝜨'=>'N','𝝢'=>'N','𝞜'=>'N','ɲ'=>'ņ','ɳ'=>'n̢','ƞ'=>'n̩','𝛈'=>'n̩','𝜂'=>'n̩','𝜼'=>'n̩','𝝶'=>'n̩','𝞰'=>'n̩','nj'=>'nj','o'=>'o','ℴ'=>'o','𝐨'=>'o','𝑜'=>'o','𝒐'=>'o','𝓸'=>'o','𝔬'=>'o','𝕠'=>'o','𝖔'=>'o','𝗈'=>'o','𝗼'=>'o','𝘰'=>'o','𝙤'=>'o','𝚘'=>'o','ᴏ'=>'o','𝛐'=>'o','𝜊'=>'o','𝝄'=>'o','𝝾'=>'o','𝞸'=>'o','ɵ'=>'o̵','ǿ'=>'ó̵','ø'=>'o̷','œ'=>'oe','ơ'=>'oʼ','⍴'=>'p','p'=>'p','𝐩'=>'p','𝑝'=>'p','𝒑'=>'p','𝓅'=>'p','𝓹'=>'p','𝔭'=>'p','𝕡'=>'p','𝖕'=>'p','𝗉'=>'p','𝗽'=>'p','𝘱'=>'p','𝙥'=>'p','𝚙'=>'p','𝛒'=>'p','𝛠'=>'p','𝜌'=>'p','𝜚'=>'p','𝝆'=>'p','𝝔'=>'p','𝞀'=>'p','𝞎'=>'p','𝞺'=>'p','𝟈'=>'p','ƥ'=>'p̔','q'=>'q','𝐪'=>'q','𝑞'=>'q','𝒒'=>'q','𝓆'=>'q','𝓺'=>'q','𝔮'=>'q','𝕢'=>'q','𝖖'=>'q','𝗊'=>'q','𝗾'=>'q','𝘲'=>'q','𝙦'=>'q','𝚚'=>'q','𝐐'=>'Q','𝑄'=>'Q','𝑸'=>'Q','𝒬'=>'Q','𝓠'=>'Q','𝔔'=>'Q','𝕼'=>'Q','𝖰'=>'Q','𝗤'=>'Q','𝘘'=>'Q','𝙌'=>'Q','𝚀'=>'Q','ʠ'=>'q̔','𝛋'=>'ĸ','𝛞'=>'ĸ','𝜅'=>'ĸ','𝜘'=>'ĸ','𝜿'=>'ĸ','𝝒'=>'ĸ','𝝹'=>'ĸ','𝞌'=>'ĸ','𝞳'=>'ĸ','𝟆'=>'ĸ','r'=>'r','𝐫'=>'r','𝑟'=>'r','𝒓'=>'r','𝓇'=>'r','𝓻'=>'r','𝔯'=>'r','𝕣'=>'r','𝖗'=>'r','𝗋'=>'r','𝗿'=>'r','𝘳'=>'r','𝙧'=>'r','𝚛'=>'r','ɽ'=>'r̢','ɼ'=>'r̩','s'=>'s','𝐬'=>'s','𝑠'=>'s','𝒔'=>'s','𝓈'=>'s','𝓼'=>'s','𝔰'=>'s','𝕤'=>'s','𝖘'=>'s','𝗌'=>'s','𝘀'=>'s','𝘴'=>'s','𝙨'=>'s','𝚜'=>'s','ƽ'=>'s','ʂ'=>'s̢','∫'=>'ʃ','∬'=>'ʃʃ','∭'=>'ʃʃʃ','⨌'=>'ʃʃʃʃ','t'=>'t','𝐭'=>'t','𝑡'=>'t','𝒕'=>'t','𝓉'=>'t','𝓽'=>'t','𝔱'=>'t','𝕥'=>'t','𝖙'=>'t','𝗍'=>'t','𝘁'=>'t','𝘵'=>'t','𝙩'=>'t','𝚝'=>'t','𝑇'=>'T','𝑻'=>'T','𝒯'=>'T','𝓣'=>'T','𝔗'=>'T','𝕋'=>'T','𝕿'=>'T','𝖳'=>'T','𝗧'=>'T','𝘛'=>'T','𝙏'=>'T','𝚃'=>'T','𝚻'=>'T','𝛵'=>'T','𝜯'=>'T','𝝩'=>'T','𝞣'=>'T','ƭ'=>'t̔','ț'=>'ţ','ƫ'=>'ţ','ŧ'=>'t̵','u'=>'u','𝐮'=>'u','𝑢'=>'u','𝒖'=>'u','𝓊'=>'u','𝓾'=>'u','𝔲'=>'u','𝕦'=>'u','𝖚'=>'u','𝗎'=>'u','𝘂'=>'u','𝘶'=>'u','𝙪'=>'u','𝚞'=>'u','ʊ'=>'u','ʋ'=>'u','𝛖'=>'u','𝜐'=>'u','𝝊'=>'u','𝞄'=>'u','𝞾'=>'u','𝑈'=>'U','𝑼'=>'U','𝒰'=>'U','𝓤'=>'U','𝔘'=>'U','𝕌'=>'U','𝖀'=>'U','𝖴'=>'U','𝗨'=>'U','𝘜'=>'U','𝙐'=>'U','𝚄'=>'U','v'=>'v','ⅴ'=>'v','𝐯'=>'v','𝑣'=>'v','𝒗'=>'v','𝓋'=>'v','𝓿'=>'v','𝔳'=>'v','𝕧'=>'v','𝖛'=>'v','𝗏'=>'v','𝘃'=>'v','𝘷'=>'v','𝙫'=>'v','𝚟'=>'v','𝛎'=>'v','𝜈'=>'v','𝝂'=>'v','𝝼'=>'v','𝞶'=>'v','ⅵ'=>'vi','ⅶ'=>'vii','ⅷ'=>'viii','ɯ'=>'w','w'=>'w','𝐰'=>'w','𝑤'=>'w','𝒘'=>'w','𝓌'=>'w','𝔀'=>'w','𝔴'=>'w','𝕨'=>'w','𝖜'=>'w','𝗐'=>'w','𝘄'=>'w','𝘸'=>'w','𝙬'=>'w','𝚠'=>'w','𝑊'=>'W','𝑾'=>'W','𝒲'=>'W','𝓦'=>'W','𝔚'=>'W','𝕎'=>'W','𝖂'=>'W','𝖶'=>'W','𝗪'=>'W','𝘞'=>'W','𝙒'=>'W','𝚆'=>'W','×'=>'x','x'=>'x','ⅹ'=>'x','𝐱'=>'x','𝑥'=>'x','𝒙'=>'x','𝓍'=>'x','𝔁'=>'x','𝔵'=>'x','𝕩'=>'x','𝖝'=>'x','𝗑'=>'x','𝘅'=>'x','𝘹'=>'x','𝙭'=>'x','𝚡'=>'x','᙭'=>'X','𝑋'=>'X','𝑿'=>'X','𝒳'=>'X','𝓧'=>'X','𝔛'=>'X','𝕏'=>'X','𝖃'=>'X','𝖷'=>'X','𝗫'=>'X','𝘟'=>'X','𝙓'=>'X','𝚇'=>'X','𝚾'=>'X','𝛸'=>'X','𝜲'=>'X','𝝬'=>'X','𝞦'=>'X','ⅺ'=>'xi','ⅻ'=>'xii','y'=>'y','𝐲'=>'y','𝑦'=>'y','𝒚'=>'y','𝓎'=>'y','𝔂'=>'y','𝔶'=>'y','𝕪'=>'y','𝖞'=>'y','𝗒'=>'y','𝘆'=>'y','𝘺'=>'y','𝙮'=>'y','𝚢'=>'y','ƴ'=>'y̔','z'=>'z','𝐳'=>'z','𝑧'=>'z','𝒛'=>'z','𝓏'=>'z','𝔃'=>'z','𝔷'=>'z','𝕫'=>'z','𝖟'=>'z','𝗓'=>'z','𝘇'=>'z','𝘻'=>'z','𝙯'=>'z','𝚣'=>'z','ȥ'=>'z̡','ʐ'=>'z̢','ƶ'=>'z̵','ȝ'=>'ʒ','?'=>'ʔ','?'=>'ʔ','⁇'=>'ʔʔ','⁈'=>'ʔǃ','᾽'=>'ʼ','᾿'=>'ʼ','’'=>'ʼ','ʾ'=>'ʼ','!'=>'ǃ','!'=>'ǃ','⁉'=>'ǃʔ','‼'=>'ǃǃ','⍺'=>'α','𝛂'=>'α','𝛼'=>'α','𝜶'=>'α','𝝰'=>'α','𝞪'=>'α','𝛃'=>'β','𝛽'=>'β','𝜷'=>'β','𝝱'=>'β','𝞫'=>'β','ℽ'=>'γ','𝛄'=>'γ','𝛾'=>'γ','𝜸'=>'γ','𝝲'=>'γ','𝞬'=>'γ','𝛅'=>'δ','𝛿'=>'δ','𝜹'=>'δ','𝝳'=>'δ','𝞭'=>'δ','𝟋'=>'ϝ','𝛇'=>'ζ','𝜁'=>'ζ','𝜻'=>'ζ','𝝵'=>'ζ','𝞯'=>'ζ','⍬'=>'θ','𝛉'=>'θ','𝛝'=>'θ','𝜃'=>'θ','𝜗'=>'θ','𝜽'=>'θ','𝝑'=>'θ','𝝷'=>'θ','𝞋'=>'θ','𝞱'=>'θ','𝟅'=>'θ','𝛌'=>'λ','𝜆'=>'λ','𝝀'=>'λ','𝝺'=>'λ','𝞴'=>'λ','𝛬'=>'Λ','𝜦'=>'Λ','𝝠'=>'Λ','𝞚'=>'Λ','𝛍'=>'μ','𝜇'=>'μ','𝝁'=>'μ','𝝻'=>'μ','𝞵'=>'μ','𝛏'=>'ξ','𝜉'=>'ξ','𝝃'=>'ξ','𝝽'=>'ξ','𝞷'=>'ξ','𝛯'=>'Ξ','𝜩'=>'Ξ','𝝣'=>'Ξ','𝞝'=>'Ξ','ℼ'=>'π','𝛑'=>'π','𝛡'=>'π','𝜋'=>'π','𝜛'=>'π','𝝅'=>'π','𝝕'=>'π','𝝿'=>'π','𝞏'=>'π','𝞹'=>'π','𝟉'=>'π','ᴨ'=>'π','∏'=>'Π','𝚷'=>'Π','𝛱'=>'Π','𝜫'=>'Π','𝝥'=>'Π','𝞟'=>'Π','𝛔'=>'σ','𝜎'=>'σ','𝝈'=>'σ','𝞂'=>'σ','𝞼'=>'σ','𝛕'=>'τ','𝜏'=>'τ','𝝉'=>'τ','𝞃'=>'τ','𝞽'=>'τ','𝐘'=>'Y','𝑌'=>'Y','𝒀'=>'Y','𝒴'=>'Y','𝓨'=>'Y','𝔜'=>'Y','𝕐'=>'Y','𝖄'=>'Y','𝖸'=>'Y','𝗬'=>'Y','𝘠'=>'Y','𝙔'=>'Y','𝚈'=>'Y','𝚼'=>'Y','𝛶'=>'Y','𝜰'=>'Y','𝝪'=>'Y','𝞤'=>'Y','𝛗'=>'φ','𝛟'=>'φ','𝜑'=>'φ','𝜙'=>'φ','𝝋'=>'φ','𝝓'=>'φ','𝞅'=>'φ','𝞍'=>'φ','𝞿'=>'φ','𝟇'=>'φ','𝛷'=>'Φ','𝜱'=>'Φ','𝝫'=>'Φ','𝞥'=>'Φ','𝛘'=>'χ','𝜒'=>'χ','𝝌'=>'χ','𝞆'=>'χ','𝟀'=>'χ','𝛙'=>'ψ','𝜓'=>'ψ','𝝍'=>'ψ','𝞇'=>'ψ','𝟁'=>'ψ','𝛹'=>'Ψ','𝜳'=>'Ψ','𝝭'=>'Ψ','𝞧'=>'Ψ','⍵'=>'ω','𝛚'=>'ω','𝜔'=>'ω','𝝎'=>'ω','𝞈'=>'ω','𝟂'=>'ω','ӕ'=>'ae','ғ'=>'r̵','ґ'=>'rᑊ','җ'=>'ж̩','ҙ'=>'з̡','ӏ'=>'i','ҋ'=>'й̡','қ'=>'ĸ̩','ҟ'=>'ĸ̵','ᴫ'=>'л','ӆ'=>'л̡','ӎ'=>'м̡','ӊ'=>'н̡','ӈ'=>'н̡','ң'=>'н̩','ө'=>'o̵','ѳ'=>'o̵','ҫ'=>'c̡','ҭ'=>'т̩','ү'=>'y','ұ'=>'y̵','ћ'=>'h̵','ѽ'=>'ѡ҃','ӌ'=>'ҷ','ҿ'=>'ҽ̢','ҍ'=>'Ь̵','զ'=>'q','ռ'=>'n','ℵ'=>'א','ﬡ'=>'א','אָ'=>'אַ','אּ'=>'אַ','ﭏ'=>'אל','ℶ'=>'ב','ℷ'=>'ג','ℸ'=>'ד','ﬢ'=>'ד','ﬣ'=>'ה','ﬤ'=>'כ','ﬥ'=>'ל','ﬦ'=>'ם','ﬠ'=>'ע','ﬧ'=>'ר','ﬨ'=>'ת','ﺀ'=>'ء','ﺂ'=>'آ','ﺁ'=>'آ','ﺄ'=>'أ','ﺃ'=>'أ','ٵ'=>'أ','ﭑ'=>'ٱ','ﭐ'=>'ٱ','ﺆ'=>'ؤ','ﺅ'=>'ؤ','ٶ'=>'ؤ','ﺈ'=>'إ','ﺇ'=>'إ','ﺋ'=>'ئ','ﺌ'=>'ئ','ﺊ'=>'ئ','ﺉ'=>'ئ','ﯫ'=>'ئا','ﯪ'=>'ئا','ﯸ'=>'ئٻ','ﯷ'=>'ئٻ','ﯶ'=>'ئٻ','ﲗ'=>'ئج','ﰀ'=>'ئج','ﲘ'=>'ئح','ﰁ'=>'ئح','ﲙ'=>'ئخ','ﱤ'=>'ئر','ﱥ'=>'ئز','ﲚ'=>'ئم','ﳟ'=>'ئم','ﱦ'=>'ئم','ﰂ'=>'ئم','ﱧ'=>'ئن','ﲛ'=>'ئه','ﳠ'=>'ئه','ﯭ'=>'ئه','ﯬ'=>'ئه','ﯯ'=>'ئو','ﯮ'=>'ئو','ﯳ'=>'ئۆ','ﯲ'=>'ئۆ','ﯱ'=>'ئۇ','ﯰ'=>'ئۇ','ﯵ'=>'ئۈ','ﯴ'=>'ئۈ','ﯻ'=>'ئى','ﯺ'=>'ئى','ﱨ'=>'ئى','ﯹ'=>'ئى','ﰃ'=>'ئى','ﱩ'=>'ئى','ﰄ'=>'ئى','ﺎ'=>'ا','ﺍ'=>'ا','ﴼ'=>'اً','ﴽ'=>'اً','ﷳ'=>'اكبر','ﷲ'=>'الله','ﺑ'=>'ب','ﺒ'=>'ب','ﺐ'=>'ب','ﺏ'=>'ب','ﲜ'=>'بج','ﰅ'=>'بج','ﲝ'=>'بح','ﰆ'=>'بح','ﷂ'=>'بحى','ﲞ'=>'بخ','ﰇ'=>'بخ','ﶞ'=>'بخى','ﱪ'=>'بر','ﱫ'=>'بز','ﲟ'=>'بم','ﳡ'=>'بم','ﱬ'=>'بم','ﰈ'=>'بم','ﱭ'=>'بن','ﲠ'=>'به','ﳢ'=>'به','ﱮ'=>'بى','ﰉ'=>'بى','ﱯ'=>'بى','ﰊ'=>'بى','ﭔ'=>'ٻ','ﭕ'=>'ٻ','ﭓ'=>'ٻ','ﭒ'=>'ٻ','ې'=>'ٻ','ﯦ'=>'ٻ','ﯧ'=>'ٻ','ﯥ'=>'ٻ','ﯤ'=>'ٻ','ﭘ'=>'پ','ﭙ'=>'پ','ﭗ'=>'پ','ﭖ'=>'پ','ﭜ'=>'ڀ','ﭝ'=>'ڀ','ﭛ'=>'ڀ','ﭚ'=>'ڀ','ﺔ'=>'ة','ﺓ'=>'ة','ﺗ'=>'ت','ﺘ'=>'ت','ﺖ'=>'ت','ﺕ'=>'ت','ﲡ'=>'تج','ﰋ'=>'تج','ﵐ'=>'تجم','ﶠ'=>'تجى','ﶟ'=>'تجى','ﲢ'=>'تح','ﰌ'=>'تح','ﵒ'=>'تحج','ﵑ'=>'تحج','ﵓ'=>'تحم','ﲣ'=>'تخ','ﰍ'=>'تخ','ﵔ'=>'تخم','ﶢ'=>'تخى','ﶡ'=>'تخى','ﱰ'=>'تر','ﱱ'=>'تز','ﲤ'=>'تم','ﳣ'=>'تم','ﱲ'=>'تم','ﰎ'=>'تم','ﵕ'=>'تمج','ﵖ'=>'تمح','ﵗ'=>'تمخ','ﶤ'=>'تمى','ﶣ'=>'تمى','ﱳ'=>'تن','ﲥ'=>'ته','ﳤ'=>'ته','ﱴ'=>'تى','ﰏ'=>'تى','ﱵ'=>'تى','ﰐ'=>'تى','ﺛ'=>'ث','ﺜ'=>'ث','ﺚ'=>'ث','ﺙ'=>'ث','ﰑ'=>'ثج','ﱶ'=>'ثر','ﱷ'=>'ثز','ﲦ'=>'ثم','ﳥ'=>'ثم','ﱸ'=>'ثم','ﰒ'=>'ثم','ﱹ'=>'ثن','ﳦ'=>'ثه','ﱺ'=>'ثى','ﰓ'=>'ثى','ﱻ'=>'ثى','ﰔ'=>'ثى','ﭨ'=>'ٹ','ﭩ'=>'ٹ','ﭧ'=>'ٹ','ﭦ'=>'ٹ','ڻ'=>'ٹ','ﮢ'=>'ٹ','ﮣ'=>'ٹ','ﮡ'=>'ٹ','ﮠ'=>'ٹ','ﭠ'=>'ٺ','ﭡ'=>'ٺ','ﭟ'=>'ٺ','ﭞ'=>'ٺ','ﭤ'=>'ٿ','ﭥ'=>'ٿ','ﭣ'=>'ٿ','ﭢ'=>'ٿ','ﺟ'=>'ج','ﺠ'=>'ج','ﺞ'=>'ج','ﺝ'=>'ج','ﲧ'=>'جح','ﰕ'=>'جح','ﶦ'=>'جحى','ﶾ'=>'جحى','ﷻ'=>'جل جلاله','ﲨ'=>'جم','ﰖ'=>'جم','ﵙ'=>'جمح','ﵘ'=>'جمح','ﶧ'=>'جمى','ﶥ'=>'جمى','ﴝ'=>'جى','ﴁ'=>'جى','ﴞ'=>'جى','ﴂ'=>'جى','ﭸ'=>'ڃ','ﭹ'=>'ڃ','ﭷ'=>'ڃ','ﭶ'=>'ڃ','ﭴ'=>'ڄ','ﭵ'=>'ڄ','ﭳ'=>'ڄ','ﭲ'=>'ڄ','ﭼ'=>'چ','ﭽ'=>'چ','ﭻ'=>'چ','ﭺ'=>'چ','ﮀ'=>'ڇ','ﮁ'=>'ڇ','ﭿ'=>'ڇ','ﭾ'=>'ڇ','ﺣ'=>'ح','ﺤ'=>'ح','ﺢ'=>'ح','ﺡ'=>'ح','ﲩ'=>'حج','ﰗ'=>'حج','ﶿ'=>'حجى','ﲪ'=>'حم','ﰘ'=>'حم','ﵛ'=>'حمى','ﵚ'=>'حمى','ﴛ'=>'حى','ﳿ'=>'حى','ﴜ'=>'حى','ﴀ'=>'حى','ﺧ'=>'خ','ﺨ'=>'خ','ﺦ'=>'خ','ﺥ'=>'خ','ﲫ'=>'خج','ﰙ'=>'خج','ﰚ'=>'خح','ﲬ'=>'خم','ﰛ'=>'خم','ﴟ'=>'خى','ﴃ'=>'خى','ﴠ'=>'خى','ﴄ'=>'خى','ﺪ'=>'د','ﺩ'=>'د','ﺬ'=>'ذ','ﺫ'=>'ذ','ﱛ'=>'ذٰ','ﮉ'=>'ڈ','ﮈ'=>'ڈ','ﮅ'=>'ڌ','ﮄ'=>'ڌ','ﮃ'=>'ڍ','ﮂ'=>'ڍ','ﮇ'=>'ڎ','ﮆ'=>'ڎ','ﺮ'=>'ر','ﺭ'=>'ر','ﱜ'=>'رٰ','ﷶ'=>'رسول','﷼'=>'رىال','ﺰ'=>'ز','ﺯ'=>'ز','ﮍ'=>'ڑ','ﮌ'=>'ڑ','ﮋ'=>'ژ','ﮊ'=>'ژ','ﺳ'=>'س','ﺴ'=>'س','ﺲ'=>'س','ﺱ'=>'س','ﲭ'=>'سج','ﴴ'=>'سج','ﰜ'=>'سج','ﵝ'=>'سجح','ﵞ'=>'سجى','ﲮ'=>'سح','ﴵ'=>'سح','ﰝ'=>'سح','ﵜ'=>'سحج','ﲯ'=>'سخ','ﴶ'=>'سخ','ﰞ'=>'سخ','ﶨ'=>'سخى','ﷆ'=>'سخى','ﴪ'=>'سر','ﴎ'=>'سر','ﲰ'=>'سم','ﳧ'=>'سم','ﰟ'=>'سم','ﵡ'=>'سمج','ﵠ'=>'سمح','ﵟ'=>'سمح','ﵣ'=>'سمم','ﵢ'=>'سمم','ﴱ'=>'سه','ﳨ'=>'سه','ﴗ'=>'سى','ﳻ'=>'سى','ﴘ'=>'سى','ﳼ'=>'سى','ﺷ'=>'ش','ﺸ'=>'ش','ﺶ'=>'ش','ﺵ'=>'ش','ﴭ'=>'شج','ﴷ'=>'شج','ﴥ'=>'شج','ﴉ'=>'شج','ﵩ'=>'شجى','ﴮ'=>'شح','ﴸ'=>'شح','ﴦ'=>'شح','ﴊ'=>'شح','ﵨ'=>'شحم','ﵧ'=>'شحم','ﶪ'=>'شحى','ﴯ'=>'شخ','ﴹ'=>'شخ','ﴧ'=>'شخ','ﴋ'=>'شخ','ﴩ'=>'شر','ﴍ'=>'شر','ﴰ'=>'شم','ﳩ'=>'شم','ﴨ'=>'شم','ﴌ'=>'شم','ﵫ'=>'شمخ','ﵪ'=>'شمخ','ﵭ'=>'شمم','ﵬ'=>'شمم','ﴲ'=>'شه','ﳪ'=>'شه','ﴙ'=>'شى','ﳽ'=>'شى','ﴚ'=>'شى','ﳾ'=>'شى','ﺻ'=>'ص','ﺼ'=>'ص','ﺺ'=>'ص','ﺹ'=>'ص','ﲱ'=>'صح','ﰠ'=>'صح','ﵥ'=>'صحح','ﵤ'=>'صحح','ﶩ'=>'صحى','ﲲ'=>'صخ','ﴫ'=>'صر','ﴏ'=>'صر','ﷵ'=>'صلعم','ﷹ'=>'صلى','ﷺ'=>'صلى الله علىه وسلم','ﷰ'=>'صلے','ﲳ'=>'صم','ﰡ'=>'صم','ﷅ'=>'صمم','ﵦ'=>'صمم','ﴡ'=>'صى','ﴅ'=>'صى','ﴢ'=>'صى','ﴆ'=>'صى','ﺿ'=>'ض','ﻀ'=>'ض','ﺾ'=>'ض','ﺽ'=>'ض','ﲴ'=>'ضج','ﰢ'=>'ضج','ﲵ'=>'ضح','ﰣ'=>'ضح','ﵮ'=>'ضحى','ﶫ'=>'ضحى','ﲶ'=>'ضخ','ﰤ'=>'ضخ','ﵰ'=>'ضخم','ﵯ'=>'ضخم','ﴬ'=>'ضر','ﴐ'=>'ضر','ﲷ'=>'ضم','ﰥ'=>'ضم','ﴣ'=>'ضى','ﴇ'=>'ضى','ﴤ'=>'ضى','ﴈ'=>'ضى','ﻃ'=>'ط','ﻄ'=>'ط','ﻂ'=>'ط','ﻁ'=>'ط','ﲸ'=>'طح','ﰦ'=>'طح','ﴳ'=>'طم','ﴺ'=>'طم','ﰧ'=>'طم','ﵲ'=>'طمح','ﵱ'=>'طمح','ﵳ'=>'طمم','ﵴ'=>'طمى','ﴑ'=>'طى','ﳵ'=>'طى','ﴒ'=>'طى','ﳶ'=>'طى','ﻇ'=>'ظ','ﻈ'=>'ظ','ﻆ'=>'ظ','ﻅ'=>'ظ','ﲹ'=>'ظم','ﴻ'=>'ظم','ﰨ'=>'ظم','ﻋ'=>'ع','ﻌ'=>'ع','ﻊ'=>'ع','ﻉ'=>'ع','ﲺ'=>'عج','ﰩ'=>'عج','ﷄ'=>'عجم','ﵵ'=>'عجم','ﷷ'=>'علىه','ﲻ'=>'عم','ﰪ'=>'عم','ﵷ'=>'عمم','ﵶ'=>'عمم','ﵸ'=>'عمى','ﶶ'=>'عمى','ﴓ'=>'عى','ﳷ'=>'عى','ﴔ'=>'عى','ﳸ'=>'عى','ﻏ'=>'غ','ﻐ'=>'غ','ﻎ'=>'غ','ﻍ'=>'غ','ﲼ'=>'غج','ﰫ'=>'غج','ﲽ'=>'غم','ﰬ'=>'غم','ﵹ'=>'غمم','ﵻ'=>'غمى','ﵺ'=>'غمى','ﴕ'=>'غى','ﳹ'=>'غى','ﴖ'=>'غى','ﳺ'=>'غى','ﻓ'=>'ف','ﻔ'=>'ف','ﻒ'=>'ف','ﻑ'=>'ف','ﲾ'=>'فج','ﰭ'=>'فج','ﲿ'=>'فح','ﰮ'=>'فح','ﳀ'=>'فخ','ﰯ'=>'فخ','ﵽ'=>'فخم','ﵼ'=>'فخم','ﳁ'=>'فم','ﰰ'=>'فم','ﷁ'=>'فمى','ﱼ'=>'فى','ﰱ'=>'فى','ﱽ'=>'فى','ﰲ'=>'فى','ﭬ'=>'ڤ','ﭭ'=>'ڤ','ﭫ'=>'ڤ','ﭪ'=>'ڤ','ﭰ'=>'ڦ','ﭱ'=>'ڦ','ﭯ'=>'ڦ','ﭮ'=>'ڦ','ﻗ'=>'ق','ﻘ'=>'ق','ﻖ'=>'ق','ﻕ'=>'ق','ﳂ'=>'قح','ﰳ'=>'قح','ﷱ'=>'قلے','ﳃ'=>'قم','ﰴ'=>'قم','ﶴ'=>'قمح','ﵾ'=>'قمح','ﵿ'=>'قمم','ﶲ'=>'قمى','ﱾ'=>'قى','ﰵ'=>'قى','ﱿ'=>'قى','ﰶ'=>'قى','ﻛ'=>'ك','ﻜ'=>'ك','ﻚ'=>'ك','ﻙ'=>'ك','ک'=>'ك','ﮐ'=>'ك','ﮑ'=>'ك','ﮏ'=>'ك','ﮎ'=>'ك','ﲀ'=>'كا','ﰷ'=>'كا','ﳄ'=>'كج','ﰸ'=>'كج','ﳅ'=>'كح','ﰹ'=>'كح','ﳆ'=>'كخ','ﰺ'=>'كخ','ﳇ'=>'كل','ﳫ'=>'كل','ﲁ'=>'كل','ﰻ'=>'كل','ﳈ'=>'كم','ﳬ'=>'كم','ﲂ'=>'كم','ﰼ'=>'كم','ﷃ'=>'كمم','ﶻ'=>'كمم','ﶷ'=>'كمى','ﲃ'=>'كى','ﰽ'=>'كى','ﲄ'=>'كى','ﰾ'=>'كى','ﯕ'=>'ڭ','ﯖ'=>'ڭ','ﯔ'=>'ڭ','ﯓ'=>'ڭ','ﮔ'=>'گ','ﮕ'=>'گ','ﮓ'=>'گ','ﮒ'=>'گ','ﮜ'=>'ڱ','ﮝ'=>'ڱ','ﮛ'=>'ڱ','ﮚ'=>'ڱ','ﮘ'=>'ڳ','ﮙ'=>'ڳ','ﮗ'=>'ڳ','ﮖ'=>'ڳ','ﻟ'=>'ل','ﻠ'=>'ل','ﻞ'=>'ل','ﻝ'=>'ل','ﻶ'=>'لآ','ﻵ'=>'لآ','ﻸ'=>'لأ','ﻷ'=>'لأ','ﻺ'=>'لإ','ﻹ'=>'لإ','ﻼ'=>'لا','ﻻ'=>'لا','ﳉ'=>'لج','ﰿ'=>'لج','ﶃ'=>'لجج','ﶄ'=>'لجج','ﶺ'=>'لجم','ﶼ'=>'لجم','ﶬ'=>'لجى','ﳊ'=>'لح','ﱀ'=>'لح','ﶵ'=>'لحم','ﶀ'=>'لحم','ﶂ'=>'لحى','ﶁ'=>'لحى','ﳋ'=>'لخ','ﱁ'=>'لخ','ﶆ'=>'لخم','ﶅ'=>'لخم','ﳌ'=>'لم','ﳭ'=>'لم','ﲅ'=>'لم','ﱂ'=>'لم','ﶈ'=>'لمح','ﶇ'=>'لمح','ﶭ'=>'لمى','ﳍ'=>'له','ﲆ'=>'لى','ﱃ'=>'لى','ﲇ'=>'لى','ﱄ'=>'لى','ﻣ'=>'م','ﻤ'=>'م','ﻢ'=>'م','ﻡ'=>'م','ﲈ'=>'ما','ﳎ'=>'مج','ﱅ'=>'مج','ﶌ'=>'مجح','ﶒ'=>'مجخ','ﶍ'=>'مجم','ﷀ'=>'مجى','ﳏ'=>'مح','ﱆ'=>'مح','ﶉ'=>'محج','ﶊ'=>'محم','ﷴ'=>'محمد','ﶋ'=>'محى','ﳐ'=>'مخ','ﱇ'=>'مخ','ﶎ'=>'مخج','ﶏ'=>'مخم','ﶹ'=>'مخى','ﳑ'=>'مم','ﲉ'=>'مم','ﱈ'=>'مم','ﶱ'=>'ممى','ﱉ'=>'مى','ﱊ'=>'مى','ﻧ'=>'ن','ﻨ'=>'ن','ﻦ'=>'ن','ﻥ'=>'ن','ﳒ'=>'نج','ﱋ'=>'نج','ﶸ'=>'نجح','ﶽ'=>'نجح','ﶘ'=>'نجم','ﶗ'=>'نجم','ﶙ'=>'نجى','ﷇ'=>'نجى','ﳓ'=>'نح','ﱌ'=>'نح','ﶕ'=>'نحم','ﶖ'=>'نحى','ﶳ'=>'نحى','ﳔ'=>'نخ','ﱍ'=>'نخ','ﲊ'=>'نر','ﲋ'=>'نز','ﳕ'=>'نم','ﳮ'=>'نم','ﲌ'=>'نم','ﱎ'=>'نم','ﶛ'=>'نمى','ﶚ'=>'نمى','ﲍ'=>'نن','ﳖ'=>'نه','ﳯ'=>'نه','ﲎ'=>'نى','ﱏ'=>'نى','ﲏ'=>'نى','ﱐ'=>'نى','ﮟ'=>'ں','ﮞ'=>'ں','ﻫ'=>'ه','ﻬ'=>'ه','ﻪ'=>'ه','ﻩ'=>'ه','ھ'=>'ه','ﮬ'=>'ه','ﮭ'=>'ه','ﮫ'=>'ه','ﮪ'=>'ه','ہ'=>'ه','ﮨ'=>'ه','ﮩ'=>'ه','ﮧ'=>'ه','ﮦ'=>'ه','ە'=>'ه','ﳙ'=>'هٰ','ﳗ'=>'هج','ﱑ'=>'هج','ﳘ'=>'هم','ﱒ'=>'هم','ﶓ'=>'همج','ﶔ'=>'همم','ﱓ'=>'هى','ﱔ'=>'هى','ﮥ'=>'ۀ','ﮤ'=>'ۀ','ﻮ'=>'و','ﻭ'=>'و','ﷸ'=>'وسلم','ﯡ'=>'ۅ','ﯠ'=>'ۅ','ﯚ'=>'ۆ','ﯙ'=>'ۆ','ﯘ'=>'ۇ','ﯗ'=>'ۇ','ٷ'=>'ۇٔ','ﯝ'=>'ۇٔ','ﯜ'=>'ۈ','ﯛ'=>'ۈ','ﯣ'=>'ۉ','ﯢ'=>'ۉ','ﯟ'=>'ۋ','ﯞ'=>'ۋ','ﯨ'=>'ى','ﯩ'=>'ى','ﻰ'=>'ى','ﻯ'=>'ى','ي'=>'ى','ﻳ'=>'ى','ﻴ'=>'ى','ﻲ'=>'ى','ﻱ'=>'ى','ی'=>'ى','ﯾ'=>'ى','ﯿ'=>'ى','ﯽ'=>'ى','ﯼ'=>'ى','ٸ'=>'ىٔ','ﲐ'=>'ىٰ','ﱝ'=>'ىٰ','ﳚ'=>'ىج','ﱕ'=>'ىج','ﶯ'=>'ىجى','ﳛ'=>'ىح','ﱖ'=>'ىح','ﶮ'=>'ىحى','ﳜ'=>'ىخ','ﱗ'=>'ىخ','ﲑ'=>'ىر','ﲒ'=>'ىز','ﳝ'=>'ىم','ﳰ'=>'ىم','ﲓ'=>'ىم','ﱘ'=>'ىم','ﶝ'=>'ىمم','ﶜ'=>'ىمم','ﶰ'=>'ىمى','ﲔ'=>'ىن','ﳞ'=>'ىه','ﳱ'=>'ىه','ﲕ'=>'ىى','ﱙ'=>'ىى','ﲖ'=>'ىى','ﱚ'=>'ىى','ۧ'=>'ۦ','ﮯ'=>'ے','ﮮ'=>'ے','ﮱ'=>'ۓ','ﮰ'=>'ۓ','∃'=>'ⴺ','आ'=>'अा','ऒ'=>'अाॆ','ओ'=>'अाे','औ'=>'अाै','ऄ'=>'अॆ','ऑ'=>'अॉ','ऍ'=>'एॅ','ऎ'=>'एॆ','ऐ'=>'एे','ई'=>'र्इ','আ'=>'অা','ৠ'=>'ঋৃ','ৡ'=>'ঌৢ','ਉ'=>'ੳੁ','ਊ'=>'ੳੂ','ਆ'=>'ਅਾ','ਐ'=>'ਅੈ','ਔ'=>'ਅੌ','ਇ'=>'ੲਿ','ਈ'=>'ੲੀ','ਏ'=>'ੲੇ','આ'=>'અા','ઑ'=>'અાૅ','ઓ'=>'અાે','ઔ'=>'અાૈ','ઍ'=>'અૅ','એ'=>'અે','ઐ'=>'અૈ','ଆ'=>'ଅା','௮'=>'அ','ர'=>'ஈ','ா'=>'ஈ','௫'=>'ஈு','௨'=>'உ','ஊ'=>'உள','௭'=>'எ','௷'=>'எவ','ஜ'=>'ஐ','௧'=>'க','௪'=>'ச','௬'=>'சு','௲'=>'சூ','௺'=>'நீ','ை'=>'ன','௴'=>'மீ','௰'=>'ய','ௗ'=>'ள','௸'=>'ஷ','ொ'=>'ெஈ','ௌ'=>'ெள','ோ'=>'ேஈ','ౠ'=>'ఋా','ౡ'=>'ఌా','ఔ'=>'ఒౌ','ఓ'=>'ఒౕ','ఢ'=>'డ̣','భ'=>'బ̣','ష'=>'వ̣','హ'=>'వా','మ'=>'వు','ూ'=>'ుా','ౄ'=>'ృా','ೡ'=>'ಌಾ','ಔ'=>'ఒౌ','ഈ'=>'ഇൗ','ഊ'=>'உൗ','ഐ'=>'എെ','ഓ'=>'ഒാ','ഔ'=>'ഒൗ','ൡ'=>'ഞ','൫'=>'ദ്ര','ഌ'=>'നூ','ങ'=>'നூ','൯'=>'ന്','റ'=>'ര','൪'=>'ര്','൮'=>'വ്','ീ'=>'ி','ൂ'=>'ூ','ൃ'=>'ூ','ൈ'=>'െെ','ฃ'=>'ข','ด'=>'ค','ต'=>'ค','ม'=>'ฆ','ซ'=>'ช','ฏ'=>'ฎ','ท'=>'ฑ','ๅ'=>'า','ำ'=>'̊า','แ'=>'เเ','ໜ'=>'ຫນ','ໝ'=>'ຫມ','ຳ'=>'̊າ','ཷ'=>'ྲཱྀ','ཹ'=>'ླཱྀ','၀'=>'o','ឣ'=>'អ','᧐'=>'ᦞ','᭒'=>'ᬍ','᭓'=>'ᬑ','᭘'=>'ᬨ','ᢖ'=>'ᡜ','ᡕ'=>'ᠵ','Ꮢ'=>'Ꭱ','Ꮍ'=>'y','𝐀'=>'A','𝐴'=>'A','𝑨'=>'A','𝒜'=>'A','𝓐'=>'A','𝔄'=>'A','𝔸'=>'A','𝕬'=>'A','𝖠'=>'A','𝗔'=>'A','𝘈'=>'A','𝘼'=>'A','𝙰'=>'A','𝚨'=>'A','𝛢'=>'A','𝜜'=>'A','𝝖'=>'A','𝞐'=>'A','𝐉'=>'J','𝐽'=>'J','𝑱'=>'J','𝒥'=>'J','𝓙'=>'J','𝔍'=>'J','𝕁'=>'J','𝕵'=>'J','𝖩'=>'J','𝗝'=>'J','𝘑'=>'J','𝙅'=>'J','𝙹'=>'J','Ꮷ'=>'J','⋿'=>'E','ℰ'=>'E','𝐄'=>'E','𝐸'=>'E','𝑬'=>'E','𝓔'=>'E','𝔈'=>'E','𝔼'=>'E','𝕰'=>'E','𝖤'=>'E','𝗘'=>'E','𝘌'=>'E','𝙀'=>'E','𝙴'=>'E','𝚬'=>'E','𝛦'=>'E','𝜠'=>'E','𝝚'=>'E','𝞔'=>'E','ℾ'=>'Ꮁ','𝚪'=>'Ꮁ','𝛤'=>'Ꮁ','𝜞'=>'Ꮁ','𝝘'=>'Ꮁ','𝞒'=>'Ꮁ','Ꮤ'=>'w','ℳ'=>'M','𝐌'=>'M','𝑀'=>'M','𝑴'=>'M','𝓜'=>'M','𝔐'=>'M','𝕄'=>'M','𝕸'=>'M','𝖬'=>'M','𝗠'=>'M','𝘔'=>'M','𝙈'=>'M','𝙼'=>'M','𝚳'=>'M','𝛭'=>'M','𝜧'=>'M','𝝡'=>'M','𝞛'=>'M','ℋ'=>'H','ℌ'=>'H','ℍ'=>'H','𝐇'=>'H','𝐻'=>'H','𝑯'=>'H','𝓗'=>'H','𝕳'=>'H','𝖧'=>'H','𝗛'=>'H','𝘏'=>'H','𝙃'=>'H','𝙷'=>'H','𝚮'=>'H','𝛨'=>'H','𝜢'=>'H','𝝜'=>'H','𝞖'=>'H','𝐆'=>'G','𝐺'=>'G','𝑮'=>'G','𝒢'=>'G','𝓖'=>'G','𝔊'=>'G','𝔾'=>'G','𝕲'=>'G','𝖦'=>'G','𝗚'=>'G','𝘎'=>'G','𝙂'=>'G','𝙶'=>'G','Ᏻ'=>'G','ℤ'=>'Z','ℨ'=>'Z','𝐙'=>'Z','𝑍'=>'Z','𝒁'=>'Z','𝒵'=>'Z','𝓩'=>'Z','𝖅'=>'Z','𝖹'=>'Z','𝗭'=>'Z','𝘡'=>'Z','𝙕'=>'Z','𝚉'=>'Z','𝚭'=>'Z','𝛧'=>'Z','𝜡'=>'Z','𝝛'=>'Z','𝞕'=>'Z','𝐒'=>'S','𝑆'=>'S','𝑺'=>'S','𝒮'=>'S','𝓢'=>'S','𝔖'=>'S','𝕊'=>'S','𝕾'=>'S','𝖲'=>'S','𝗦'=>'S','𝘚'=>'S','𝙎'=>'S','𝚂'=>'S','Ꮪ'=>'S','𝐕'=>'V','𝑉'=>'V','𝑽'=>'V','𝒱'=>'V','𝓥'=>'V','𝔙'=>'V','𝕍'=>'V','𝖁'=>'V','𝖵'=>'V','𝗩'=>'V','𝘝'=>'V','𝙑'=>'V','𝚅'=>'V','ℒ'=>'L','𝐋'=>'L','𝐿'=>'L','𝑳'=>'L','𝓛'=>'L','𝔏'=>'L','𝕃'=>'L','𝕷'=>'L','𝖫'=>'L','𝗟'=>'L','𝘓'=>'L','𝙇'=>'L','𝙻'=>'L','∑'=>'C','⅀'=>'C','ℂ'=>'C','ℭ'=>'C','𝐂'=>'C','𝐶'=>'C','𝑪'=>'C','𝒞'=>'C','𝓒'=>'C','𝕮'=>'C','𝖢'=>'C','𝗖'=>'C','𝘊'=>'C','𝘾'=>'C','𝙲'=>'C','𝚺'=>'C','𝛴'=>'C','𝜮'=>'C','𝝨'=>'C','𝞢'=>'C','ℙ'=>'P','𝐏'=>'P','𝑃'=>'P','𝑷'=>'P','𝒫'=>'P','𝓟'=>'P','𝔓'=>'P','𝕻'=>'P','𝖯'=>'P','𝗣'=>'P','𝘗'=>'P','𝙋'=>'P','𝙿'=>'P','𝚸'=>'P','𝛲'=>'P','𝜬'=>'P','𝝦'=>'P','𝞠'=>'P','𝐊'=>'K','𝐾'=>'K','𝑲'=>'K','𝒦'=>'K','𝓚'=>'K','𝔎'=>'K','𝕂'=>'K','𝕶'=>'K','𝖪'=>'K','𝗞'=>'K','𝘒'=>'K','𝙆'=>'K','𝙺'=>'K','𝚱'=>'K','𝛫'=>'K','𝜥'=>'K','𝝟'=>'K','𝞙'=>'K','ℬ'=>'B','𝐁'=>'B','𝐵'=>'B','𝑩'=>'B','𝓑'=>'B','𝔅'=>'B','𝔹'=>'B','𝕭'=>'B','𝖡'=>'B','𝗕'=>'B','𝘉'=>'B','𝘽'=>'B','𝙱'=>'B','𝚩'=>'B','𝛣'=>'B','𝜝'=>'B','𝝗'=>'B','𝞑'=>'B','ᐍ'=>'ᐁ·','∆'=>'ᐃ','𝚫'=>'ᐃ','𝛥'=>'ᐃ','𝜟'=>'ᐃ','𝝙'=>'ᐃ','𝞓'=>'ᐃ','ᐏ'=>'ᐃ·','ᐑ'=>'ᐄ·','ᐓ'=>'ᐅ·','ᐕ'=>'ᐆ·','ᐘ'=>'ᐊ·','ᐚ'=>'ᐋ·','ᓑ'=>'ᐡ','ᑶ'=>'·P','ᑺ'=>'·d','ᒘ'=>'·J','ᑁ'=>'ᐳ·','ᑃ'=>'ᐴ·','ᑅ'=>'ᐸ·','ᑇ'=>'ᐹ·','ˈ'=>'ᑊ','ᑘ'=>'ᑌ·','ᑧ'=>'ᑌᑊ','ᑚ'=>'ᑎ·','ᑨ'=>'ᑎᑊ','ᑜ'=>'ᑏ·','ᑞ'=>'ᑐ·','ᑩ'=>'ᑐᑊ','ᑠ'=>'ᑑ·','ᑢ'=>'ᑕ·','ᑪ'=>'ᑕᑊ','ᑤ'=>'ᑖ·','ᑵ'=>'ᑫ·','ᒅ'=>'ᑫᑊ','ᑷ'=>'P·','ᒆ'=>'Pᑊ','ᑹ'=>'ᑮ·','ᑻ'=>'d·','ᒇ'=>'dᑊ','ᑽ'=>'ᑰ·','ᑿ'=>'ᑲ·','ᒈ'=>'ᑲᑊ','ᒁ'=>'ᑳ·','ᘃ'=>'ᒉ','ᒓ'=>'ᒉ·','ᒕ'=>'ᒋ·','ᒗ'=>'ᒌ·','ᒙ'=>'J·','ᒛ'=>'ᒎ·','ᘂ'=>'ᒐ','ᒝ'=>'ᒐ·','ᒟ'=>'ᒑ·','ᒭ'=>'ᒣ·','ᒯ'=>'ᒥ·','ᒱ'=>'ᒦ·','ᒳ'=>'ᒧ·','ᒵ'=>'ᒨ·','ᒹ'=>'ᒫ·','ᓊ'=>'ᓀ·','ᓌ'=>'ᓇ·','ᓎ'=>'ᓈᒫ','ᘄ'=>'ᓓ','ᓝ'=>'ᓓ·','ᓟ'=>'ᓕ·','ᓡ'=>'ᓖ·','ᓣ'=>'ᓗ·','ᓥ'=>'ᓘ·','ᘇ'=>'ᓚ','ᓧ'=>'ᓚ·','ᓩ'=>'ᓛ·','ᓷ'=>'ᓭ·','ᓹ'=>'ᓯ·','ᓻ'=>'ᓰ·','ᓽ'=>'ᓱ·','ᓿ'=>'ᓲ·','ᔁ'=>'ᓴ·','ᔃ'=>'ᓵ·','ᔌ'=>'ᔋᐸ','ᔍ'=>'ᔋᑕ','ᔎ'=>'ᔋᑲ','ᔏ'=>'ᔋᒐ','ᔘ'=>'ᔐ·','ᔚ'=>'ᔑ·','ᔜ'=>'ᔒ·','ᔞ'=>'ᔓ·','ᔠ'=>'ᔔ·','ᔢ'=>'ᔕ·','ᔤ'=>'ᔖ·','ᔲ'=>'ᔨ·','ᔴ'=>'ᔩ·','ᔶ'=>'ᔪ·','ᔸ'=>'ᔫ·','ᔺ'=>'ᔭ·','ᔼ'=>'ᔮ·','᙮'=>'x','ᕽ'=>'x','ᘢ'=>'ᕃ','ᘣ'=>'ᕆ','ᘤ'=>'ᕊ','ᕏ'=>'ᕌ·','ᙯ'=>'ᕐᑫ','ᕾ'=>'ᕐᑬ','ᕿ'=>'ᕐP','ᖀ'=>'ᕐᑮ','ᖁ'=>'ᕐd','ᖂ'=>'ᕐᑰ','ᖃ'=>'ᕐᑲ','ᖄ'=>'ᕐᑳ','ᖅ'=>'ᕐᒃ','ᕜ'=>'ᕚ·','ᕩ'=>'ᕧ·','ℛ'=>'R','ℜ'=>'R','ℝ'=>'R','𝐑'=>'R','𝑅'=>'R','𝑹'=>'R','𝓡'=>'R','𝕽'=>'R','𝖱'=>'R','𝗥'=>'R','𝘙'=>'R','𝙍'=>'R','𝚁'=>'R','ᙰ'=>'ᖕᒉ','ᖎ'=>'ᖕᒊ','ᖏ'=>'ᖕᒋ','ᖐ'=>'ᖕᒌ','ᖑ'=>'ᖕJ','ᖒ'=>'ᖕᒎ','ᖓ'=>'ᖕᒐ','ᖔ'=>'ᖕᒑ','ᙱ'=>'ᖖᒋ','ᙲ'=>'ᖖᒌ','ᙳ'=>'ᖖJ','ᙴ'=>'ᖖᒎ','ᙵ'=>'ᖖᒐ','ᙶ'=>'ᖖᒑ','ℱ'=>'F','𝐅'=>'F','𝐹'=>'F','𝑭'=>'F','𝓕'=>'F','𝔉'=>'F','𝔽'=>'F','𝕱'=>'F','𝖥'=>'F','𝗙'=>'F','𝘍'=>'F','𝙁'=>'F','𝙵'=>'F','𝟊'=>'F','ⅅ'=>'D','𝐃'=>'D','𝐷'=>'D','𝑫'=>'D','𝒟'=>'D','𝓓'=>'D','𝔇'=>'D','𝔻'=>'D','𝕯'=>'D','𝖣'=>'D','𝗗'=>'D','𝘋'=>'D','𝘿'=>'D','𝙳'=>'D','ᗪ'=>'D','℧'=>'ᘮ','ᘴ'=>'ᘮ','𝛀'=>'ᘯ','𝛺'=>'ᘯ','𝜴'=>'ᘯ','𝝮'=>'ᘯ','𝞨'=>'ᘯ','ᘵ'=>'ᘯ','ㄱ'=>'ᄀ','ᄀ'=>'ᄀ','ᆨ'=>'ᄀ','ㄲ'=>'ᄁ','ᄁ'=>'ᄁ','ᆩ'=>'ᄁ','ㄴ'=>'ᄂ','ᄂ'=>'ᄂ','ᆫ'=>'ᄂ','ㄷ'=>'ᄃ','ᄃ'=>'ᄃ','ᆮ'=>'ᄃ','ㄸ'=>'ᄄ','ᄄ'=>'ᄄ','ㄹ'=>'ᄅ','ᄅ'=>'ᄅ','ᆯ'=>'ᄅ','ㅁ'=>'ᄆ','ᄆ'=>'ᄆ','ᆷ'=>'ᄆ','ㅂ'=>'ᄇ','ᄇ'=>'ᄇ','ᆸ'=>'ᄇ','ㅃ'=>'ᄈ','ᄈ'=>'ᄈ','ㅅ'=>'ᄉ','ᄉ'=>'ᄉ','ᆺ'=>'ᄉ','ㅆ'=>'ᄊ','ᄊ'=>'ᄊ','ᆻ'=>'ᄊ','ㅇ'=>'ᄋ','ᄋ'=>'ᄋ','ᆼ'=>'ᄋ','ㅈ'=>'ᄌ','ᄌ'=>'ᄌ','ᆽ'=>'ᄌ','ㅉ'=>'ᄍ','ᄍ'=>'ᄍ','ㅊ'=>'ᄎ','ᄎ'=>'ᄎ','ᆾ'=>'ᄎ','ㅋ'=>'ᄏ','ᄏ'=>'ᄏ','ᆿ'=>'ᄏ','ㅌ'=>'ᄐ','ᄐ'=>'ᄐ','ᇀ'=>'ᄐ','ㅍ'=>'ᄑ','ᄑ'=>'ᄑ','ᇁ'=>'ᄑ','ㅎ'=>'ᄒ','ᄒ'=>'ᄒ','ᇂ'=>'ᄒ','ᇅ'=>'ᄓ','ㅥ'=>'ᄔ','ㅦ'=>'ᄕ','ᇆ'=>'ᄕ','ᇊ'=>'ᄗ','ᇍ'=>'ᄘ','ᇐ'=>'ᄙ','ㅀ'=>'ᄚ','ᄚ'=>'ᄚ','ᄻ'=>'ᄚ','ᆶ'=>'ᄚ','ㅮ'=>'ᄜ','ᇜ'=>'ᄜ','ㅱ'=>'ᄝ','ᇢ'=>'ᄝ','ㅲ'=>'ᄞ','ㅳ'=>'ᄠ','ㅄ'=>'ᄡ','ᄡ'=>'ᄡ','ᆹ'=>'ᄡ','ㅴ'=>'ᄢ','ㅵ'=>'ᄣ','ㅶ'=>'ᄧ','ㅷ'=>'ᄩ','ㅸ'=>'ᄫ','ᇦ'=>'ᄫ','ㅹ'=>'ᄬ','ㅺ'=>'ᄭ','ᇧ'=>'ᄭ','ㅻ'=>'ᄮ','ㅼ'=>'ᄯ','ᇨ'=>'ᄯ','ᇩ'=>'ᄰ','ㅽ'=>'ᄲ','ᇪ'=>'ᄲ','ㅾ'=>'ᄶ','ㅿ'=>'ᅀ','ᇫ'=>'ᅀ','ᇬ'=>'ᅁ','ᇱ'=>'ᅅ','ㆂ'=>'ᅅ','ᇲ'=>'ᅆ','ㆃ'=>'ᅆ','ㆀ'=>'ᅇ','ᇮ'=>'ᅇ','ㆁ'=>'ᅌ','ᇰ'=>'ᅌ','ᇳ'=>'ᅖ','ㆄ'=>'ᅗ','ᇴ'=>'ᅗ','ㆅ'=>'ᅘ','ㆆ'=>'ᅙ','ᇹ'=>'ᅙ','ㅤ'=>'ᅠ','ᅠ'=>'ᅠ','ㅏ'=>'ᅡ','ᅡ'=>'ᅡ','ㅐ'=>'ᅢ','ᅢ'=>'ᅢ','ㅑ'=>'ᅣ','ᅣ'=>'ᅣ','ㅒ'=>'ᅤ','ᅤ'=>'ᅤ','ㅓ'=>'ᅥ','ᅥ'=>'ᅥ','ㅔ'=>'ᅦ','ᅦ'=>'ᅦ','ㅕ'=>'ᅧ','ᅧ'=>'ᅧ','ㅖ'=>'ᅨ','ᅨ'=>'ᅨ','ㅗ'=>'ᅩ','ᅩ'=>'ᅩ','ㅘ'=>'ᅪ','ᅪ'=>'ᅪ','ㅙ'=>'ᅫ','ᅫ'=>'ᅫ','ㅚ'=>'ᅬ','ᅬ'=>'ᅬ','ㅛ'=>'ᅭ','ᅭ'=>'ᅭ','ㅜ'=>'ᅮ','ᅮ'=>'ᅮ','ㅝ'=>'ᅯ','ᅯ'=>'ᅯ','ㅞ'=>'ᅰ','ᅰ'=>'ᅰ','ㅟ'=>'ᅱ','ᅱ'=>'ᅱ','ㅠ'=>'ᅲ','ᅲ'=>'ᅲ','ㅡ'=>'一','ᅳ'=>'一','ㅢ'=>'ᅴ','ᅴ'=>'ᅴ','ㅣ'=>'丨','ᅵ'=>'丨','ㆇ'=>'ᆄ','ᆆ'=>'ᆄ','ㆈ'=>'ᆅ','ㆉ'=>'ᆈ','ㆊ'=>'ᆑ','ㆋ'=>'ᆒ','ㆌ'=>'ᆔ','ㆍ'=>'ᆞ','ㆎ'=>'ᆡ','ㄳ'=>'ᆪ','ᆪ'=>'ᆪ','ㄵ'=>'ᆬ','ᆬ'=>'ᆬ','ㄶ'=>'ᆭ','ᆭ'=>'ᆭ','ㄺ'=>'ᆰ','ᆰ'=>'ᆰ','ㄻ'=>'ᆱ','ᆱ'=>'ᆱ','ㄼ'=>'ᆲ','ᆲ'=>'ᆲ','ㄽ'=>'ᆳ','ᆳ'=>'ᆳ','ㄾ'=>'ᆴ','ᆴ'=>'ᆴ','ㄿ'=>'ᆵ','ᆵ'=>'ᆵ','ㅧ'=>'ᇇ','ㅨ'=>'ᇈ','ㅩ'=>'ᇌ','ㅪ'=>'ᇎ','ㅫ'=>'ᇓ','ㅬ'=>'ᇗ','ㅭ'=>'ᇙ','ㅯ'=>'ᇝ','ㅰ'=>'ᇟ','ァ'=>'ァ','ア'=>'ア','ィ'=>'ィ','イ'=>'イ','ゥ'=>'ゥ','ウ'=>'ウ','ェ'=>'ェ','エ'=>'エ','ォ'=>'ォ','オ'=>'オ','カ'=>'カ','キ'=>'キ','ク'=>'ク','ケ'=>'ケ','コ'=>'コ','サ'=>'サ','シ'=>'シ','ス'=>'ス','セ'=>'セ','ソ'=>'ソ','タ'=>'タ','チ'=>'チ','ッ'=>'ッ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ナ'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ネ','ノ'=>'ノ','ハ'=>'ハ','ヒ'=>'ヒ','フ'=>'フ','ヘ'=>'へ','ホ'=>'ホ','マ'=>'マ','⧄'=>'〼','ミ'=>'ミ','ム'=>'ム','メ'=>'メ','モ'=>'モ','ャ'=>'ャ','ヤ'=>'ヤ','ュ'=>'ュ','ユ'=>'ユ','ョ'=>'ョ','ヨ'=>'ヨ','ラ'=>'ラ','リ'=>'リ','ル'=>'ル','レ'=>'レ','ロ'=>'ロ','ワ'=>'ワ','ヲ'=>'ヲ','ン'=>'ン','꒞'=>'ꁊ','꒬'=>'ꁐ','꒜'=>'ꃀ','꒿'=>'ꉙ','꒾'=>'ꊱ','꓀'=>'ꎫ','꓂'=>'ꎵ','꒺'=>'ꎿ','꒰'=>'ꏂ','𐒠'=>'𐒆','—'=>'一','―'=>'一','−'=>'一','─'=>'一','⼀'=>'一','不'=>'不','並'=>'並','|'=>'丨','|'=>'丨','∣'=>'丨','⼁'=>'丨','‖'=>'丨丨','∥'=>'丨丨','串'=>'串','⼂'=>'丶','丸'=>'丸','丹'=>'丹','丽'=>'丽','⼃'=>'丿','乁'=>'乁','⼄'=>'乙','亂'=>'亂','⼅'=>'亅','了'=>'了','⼆'=>'二','⼇'=>'亠','亮'=>'亮','⼈'=>'人','什'=>'什','仌'=>'仌','令'=>'令','你'=>'你','倂'=>'併','倂'=>'併','侀'=>'侀','來'=>'來','例'=>'例','侮'=>'侮','侮'=>'侮','侻'=>'侻','便'=>'便','值'=>'値','倫'=>'倫','偺'=>'偺','備'=>'備','像'=>'像','僚'=>'僚','僧'=>'僧','僧'=>'僧','⼉'=>'儿','兀'=>'兀','充'=>'充','免'=>'免','免'=>'免','兔'=>'兔','兤'=>'兤','⼊'=>'入','內'=>'內','全'=>'全','兩'=>'兩','⼋'=>'八','六'=>'六','具'=>'具','冀'=>'冀','⼌'=>'冂','再'=>'再','冒'=>'冒','冕'=>'冕','⼍'=>'冖','冗'=>'冗','冤'=>'冤','⼎'=>'冫','冬'=>'冬','况'=>'况','况'=>'况','冷'=>'冷','凉'=>'凉','凌'=>'凌','凜'=>'凜','凞'=>'凞','⼏'=>'几','凵'=>'凵','⼐'=>'凵','⼑'=>'刀','刃'=>'刃','切'=>'切','切'=>'切','列'=>'列','利'=>'利','刺'=>'刺','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','劉'=>'劉','力'=>'力','⼒'=>'力','劣'=>'劣','劳'=>'劳','勇'=>'勇','勇'=>'勇','勉'=>'勉','勉'=>'勉','勒'=>'勒','勞'=>'勞','勤'=>'勤','勤'=>'勤','勵'=>'勵','⼓'=>'勹','勺'=>'勺','勺'=>'勺','包'=>'包','匆'=>'匆','⼔'=>'匕','北'=>'北','北'=>'北','⼕'=>'匚','⼖'=>'匸','匿'=>'匿','⼗'=>'十','〸'=>'十','〹'=>'卄','〺'=>'卅','卉'=>'卉','卑'=>'卑','卑'=>'卑','博'=>'博','⼘'=>'卜','⼙'=>'卩','即'=>'即','卵'=>'卵','卽'=>'卽','卿'=>'卿','卿'=>'卿','卿'=>'卿','⼚'=>'厂','⼛'=>'厶','參'=>'參','⼜'=>'又','及'=>'及','叟'=>'叟','⼝'=>'口','句'=>'句','叫'=>'叫','叱'=>'叱','吆'=>'吆','吏'=>'吏','吝'=>'吝','吸'=>'吸','呂'=>'呂','呈'=>'呈','周'=>'周','咞'=>'咞','咢'=>'咢','咽'=>'咽','哶'=>'哶','唐'=>'唐','啓'=>'啓','啟'=>'啓','啕'=>'啕','啣'=>'啣','善'=>'善','善'=>'善','喇'=>'喇','喙'=>'喙','喙'=>'喙','喝'=>'喝','喝'=>'喝','喫'=>'喫','喳'=>'喳','嗀'=>'嗀','嗂'=>'嗂','嗢'=>'嗢','嘆'=>'嘆','嘆'=>'嘆','噑'=>'噑','器'=>'器','噴'=>'噴','⼞'=>'囗','囹'=>'囹','圖'=>'圖','圗'=>'圗','⼟'=>'土','型'=>'型','城'=>'城','埴'=>'埴','堍'=>'堍','報'=>'報','堲'=>'堲','塀'=>'塀','塚'=>'塚','塚'=>'塚','塞'=>'塞','填'=>'塡','墨'=>'墨','壿'=>'墫','墬'=>'墬','墳'=>'墳','壘'=>'壘','壟'=>'壟','⼠'=>'士','壮'=>'壮','売'=>'売','壷'=>'壷','⼡'=>'夂','夆'=>'夆','⼢'=>'夊','⼣'=>'夕','多'=>'多','夢'=>'夢','⼤'=>'大','奄'=>'奄','奈'=>'奈','契'=>'契','奔'=>'奔','奢'=>'奢','女'=>'女','⼥'=>'女','姘'=>'姘','姬'=>'姬','娛'=>'娛','娧'=>'娧','婢'=>'婢','婦'=>'婦','嬀'=>'媯','媵'=>'媵','嬈'=>'嬈','嬨'=>'嬨','嬾'=>'嬾','嬾'=>'嬾','⼦'=>'子','⼧'=>'宀','宅'=>'宅','寃'=>'寃','寘'=>'寘','寧'=>'寧','寧'=>'寧','寧'=>'寧','寮'=>'寮','寳'=>'寳','⼨'=>'寸','寿'=>'寿','将'=>'将','⼩'=>'小','尢'=>'尢','⼪'=>'尢','⼫'=>'尸','尿'=>'尿','屠'=>'屠','屢'=>'屢','層'=>'層','履'=>'履','屮'=>'屮','屮'=>'屮','⼬'=>'屮','⼭'=>'山','岍'=>'岍','峀'=>'峀','崙'=>'崙','嵃'=>'嵃','嵐'=>'嵐','嵫'=>'嵫','嵮'=>'嵮','嵼'=>'嵼','嶲'=>'嶲','嶺'=>'嶺','⼮'=>'巛','巡'=>'巡','巢'=>'巢','⼯'=>'工','⼰'=>'己','巽'=>'巽','⼱'=>'巾','帲'=>'帡','帨'=>'帨','帽'=>'帽','幩'=>'幩','⼲'=>'干','年'=>'年','⼳'=>'幺','⼴'=>'广','度'=>'度','庰'=>'庰','庳'=>'庳','庶'=>'庶','廉'=>'廉','廊'=>'廊','廊'=>'廊','廒'=>'廒','廓'=>'廓','廙'=>'廙','廬'=>'廬','⼵'=>'廴','廾'=>'廾','⼶'=>'廾','弄'=>'弄','⼷'=>'弋','⼸'=>'弓','弢'=>'弢','弢'=>'弢','⼹'=>'彐','当'=>'当','⼺'=>'彡','形'=>'形','彩'=>'彩','彫'=>'彫','⼻'=>'彳','律'=>'律','徚'=>'徚','復'=>'復','徭'=>'徭','⼼'=>'心','忍'=>'忍','志'=>'志','念'=>'念','忹'=>'忹','怒'=>'怒','怜'=>'怜','悁'=>'悁','悔'=>'悔','悔'=>'悔','惇'=>'惇','惘'=>'惘','惡'=>'惡','愈'=>'愈','慄'=>'慄','慈'=>'慈','慌'=>'慌','慌'=>'慌','慎'=>'慎','慎'=>'慎','慠'=>'慠','慨'=>'慨','慺'=>'慺','憎'=>'憎','憎'=>'憎','憎'=>'憎','憐'=>'憐','憤'=>'憤','憯'=>'憯','憲'=>'憲','懞'=>'懞','懲'=>'懲','懲'=>'懲','懲'=>'懲','懶'=>'懶','懶'=>'懶','戀'=>'戀','⼽'=>'戈','成'=>'成','戛'=>'戛','戮'=>'戮','戴'=>'戴','⼾'=>'戶','⼿'=>'手','扝'=>'扝','抱'=>'抱','拉'=>'拉','拏'=>'拏','拓'=>'拓','拔'=>'拔','拼'=>'拼','拾'=>'拾','挽'=>'挽','捐'=>'捐','捨'=>'捨','捻'=>'捻','掃'=>'掃','掠'=>'掠','掩'=>'掩','揄'=>'揄','揅'=>'揅','揤'=>'揤','㩁'=>'搉','搜'=>'搜','搢'=>'搢','摒'=>'摒','摩'=>'摩','摷'=>'摷','摾'=>'摾','撚'=>'撚','撝'=>'撝','擄'=>'擄','⽀'=>'支','⽁'=>'攴','敏'=>'敏','敏'=>'敏','敖'=>'敖','敬'=>'敬','數'=>'數','⽂'=>'文','⽃'=>'斗','料'=>'料','⽄'=>'斤','⽅'=>'方','旅'=>'旅','⽆'=>'无','既'=>'既','旣'=>'旣','⽇'=>'日','易'=>'易','晉'=>'晉','晩'=>'晚','䀿'=>'晣','晴'=>'晴','晴'=>'晴','暈'=>'暈','暑'=>'暑','暑'=>'暑','暜'=>'暜','暴'=>'暴','曆'=>'曆','⽈'=>'曰','更'=>'更','㫚'=>'曶','書'=>'書','最'=>'最','⽉'=>'月','肦'=>'朌','胐'=>'朏','胊'=>'朐','脁'=>'朓','朗'=>'朗','朗'=>'朗','朗'=>'朗','脧'=>'朘','望'=>'望','望'=>'望','朡'=>'朡','膧'=>'朣','⽊'=>'木','李'=>'李','杓'=>'杓','杖'=>'杖','杞'=>'杞','柿'=>'杮','杻'=>'杻','枅'=>'枅','林'=>'林','柳'=>'柳','柺'=>'柺','栗'=>'栗','栟'=>'栟','桒'=>'桒','梁'=>'梁','梅'=>'梅','梅'=>'梅','梎'=>'梎','梨'=>'梨','椔'=>'椔','楂'=>'楂','樧'=>'榝','榣'=>'榣','槪'=>'槪','樂'=>'樂','樂'=>'樂','樂'=>'樂','樓'=>'樓','檨'=>'檨','櫓'=>'櫓','櫛'=>'櫛','欄'=>'欄','⽋'=>'欠','次'=>'次','歔'=>'歔','⽌'=>'止','歲'=>'歲','歷'=>'歷','歹'=>'歹','⽍'=>'歹','殟'=>'殟','殮'=>'殮','⽎'=>'殳','殺'=>'殺','殺'=>'殺','殺'=>'殺','殻'=>'殻','⽏'=>'毋','⺟'=>'母','⽐'=>'比','⽑'=>'毛','⽒'=>'氏','⽓'=>'气','⽔'=>'水','汎'=>'汎','汧'=>'汧','沈'=>'沈','沿'=>'沿','泌'=>'泌','泍'=>'泍','泥'=>'泥','洖'=>'洖','洛'=>'洛','洞'=>'洞','洴'=>'洴','派'=>'派','流'=>'流','流'=>'流','流'=>'流','浩'=>'浩','浪'=>'浪','海'=>'海','海'=>'海','浸'=>'浸','涅'=>'涅','淋'=>'淋','淚'=>'淚','淪'=>'淪','淹'=>'淹','渚'=>'渚','港'=>'港','湮'=>'湮','潙'=>'溈','溜'=>'溜','溺'=>'溺','滇'=>'滇','滋'=>'滋','滋'=>'滋','滑'=>'滑','滛'=>'滛','漏'=>'漏','漢'=>'漢','漢'=>'漢','漣'=>'漣','潮'=>'潮','濆'=>'濆','濫'=>'濫','濾'=>'濾','瀛'=>'瀛','瀞'=>'瀞','瀞'=>'瀞','瀹'=>'瀹','灊'=>'灊','⽕'=>'火','灰'=>'灰','灷'=>'灷','災'=>'災','炙'=>'炙','炭'=>'炭','烈'=>'烈','烙'=>'烙','煅'=>'煅','煉'=>'煉','煮'=>'煮','煮'=>'煮','熜'=>'熜','燎'=>'燎','燐'=>'燐','爐'=>'爐','爛'=>'爛','爨'=>'爨','⽖'=>'爪','爫'=>'爫','⺤'=>'爫','爵'=>'爵','爵'=>'爵','⽗'=>'父','⽘'=>'爻','⽙'=>'爿','⽚'=>'片','牐'=>'牐','⽛'=>'牙','⽜'=>'牛','牢'=>'牢','犀'=>'犀','犕'=>'犕','⽝'=>'犬','犯'=>'犯','狀'=>'狀','狼'=>'狼','猪'=>'猪','猪'=>'猪','獵'=>'獵','獺'=>'獺','⽞'=>'玄','率'=>'率','率'=>'率','⽟'=>'玉','王'=>'王','玥'=>'玥','玲'=>'玲','珞'=>'珞','理'=>'理','琉'=>'琉','琢'=>'琢','瑇'=>'瑇','瑜'=>'瑜','瑩'=>'瑩','瑱'=>'瑱','瑱'=>'瑱','璅'=>'璅','璉'=>'璉','璘'=>'璘','瓊'=>'瓊','⽠'=>'瓜','⽡'=>'瓦','甆'=>'甆','⽢'=>'甘','⽣'=>'生','甤'=>'甤','⽤'=>'用','⽥'=>'田','画'=>'画','甾'=>'甾','留'=>'留','略'=>'略','異'=>'異','異'=>'異','⽦'=>'疋','⽧'=>'疒','痢'=>'痢','瘐'=>'瘐','瘝'=>'瘝','瘟'=>'瘟','療'=>'療','癩'=>'癩','⽨'=>'癶','⽩'=>'白','⽪'=>'皮','⽫'=>'皿','益'=>'益','益'=>'益','盛'=>'盛','盧'=>'盧','⽬'=>'目','直'=>'直','直'=>'直','省'=>'省','眞'=>'眞','真'=>'真','真'=>'真','着'=>'着','睊'=>'睊','睊'=>'睊','瞋'=>'瞋','瞧'=>'瞧','⽭'=>'矛','⽮'=>'矢','⽯'=>'石','硏'=>'研','硎'=>'硎','硫'=>'硫','碌'=>'碌','碌'=>'碌','碑'=>'碑','磊'=>'磊','磌'=>'磌','磌'=>'磌','磻'=>'磻','礪'=>'礪','⽰'=>'示','礼'=>'礼','社'=>'社','祈'=>'祈','祉'=>'祉','祐'=>'祐','祖'=>'祖','祖'=>'祖','祝'=>'祝','神'=>'神','祥'=>'祥','祿'=>'祿','禍'=>'禍','禎'=>'禎','福'=>'福','福'=>'福','禮'=>'禮','⽱'=>'禸','⽲'=>'禾','秊'=>'秊','秫'=>'秫','稜'=>'稜','穀'=>'穀','穀'=>'穀','穊'=>'穊','穏'=>'穏','⽳'=>'穴','突'=>'突','窱'=>'窱','立'=>'立','⽴'=>'立','竮'=>'竮','⽵'=>'竹','笠'=>'笠','節'=>'節','節'=>'節','篆'=>'篆','築'=>'築','簾'=>'簾','籠'=>'籠','⽶'=>'米','类'=>'类','粒'=>'粒','精'=>'精','糒'=>'糒','糖'=>'糖','糣'=>'糣','糧'=>'糧','糨'=>'糨','⽷'=>'糸','紀'=>'紀','紐'=>'紐','索'=>'索','累'=>'累','絶'=>'絕','絛'=>'絛','絣'=>'絣','綠'=>'綠','綾'=>'綾','緇'=>'緇','練'=>'練','練'=>'練','練'=>'練','縂'=>'縂','縉'=>'縉','縷'=>'縷','繁'=>'繁','繅'=>'繅','⽸'=>'缶','缾'=>'缾','⽹'=>'网','⺫'=>'罒','署'=>'署','罹'=>'罹','罺'=>'罺','羅'=>'羅','⽺'=>'羊','羕'=>'羕','羚'=>'羚','羽'=>'羽','⽻'=>'羽','翺'=>'翺','老'=>'老','⽼'=>'老','者'=>'者','者'=>'者','者'=>'者','⽽'=>'而','⽾'=>'耒','⽿'=>'耳','聆'=>'聆','聠'=>'聠','聯'=>'聯','聰'=>'聰','聾'=>'聾','⾀'=>'聿','⾁'=>'肉','肋'=>'肋','肭'=>'肭','育'=>'育','㬵'=>'胶','腁'=>'胼','脃'=>'脃','脾'=>'脾','臘'=>'臘','⾂'=>'臣','臨'=>'臨','⾃'=>'自','臭'=>'臭','⾄'=>'至','⾅'=>'臼','舁'=>'舁','舁'=>'舁','舄'=>'舄','⾆'=>'舌','⾇'=>'舛','⾈'=>'舟','⾉'=>'艮','良'=>'良','⾊'=>'色','⾋'=>'艸','艹'=>'艹','艹'=>'艹','芋'=>'芋','芑'=>'芑','芝'=>'芝','花'=>'花','芳'=>'芳','芽'=>'芽','若'=>'若','若'=>'若','苦'=>'苦','茝'=>'茝','茣'=>'茣','茶'=>'茶','荒'=>'荒','荓'=>'荓','荣'=>'荣','莭'=>'莭','莽'=>'莽','菉'=>'菉','菊'=>'菊','菌'=>'菌','菜'=>'菜','菧'=>'菧','華'=>'華','菱'=>'菱','落'=>'落','葉'=>'葉','著'=>'著','著'=>'著','蔿'=>'蒍','蓮'=>'蓮','蓱'=>'蓱','蓳'=>'蓳','蓼'=>'蓼','蔖'=>'蔖','蕤'=>'蕤','藍'=>'藍','藺'=>'藺','蘆'=>'蘆','蘒'=>'蘒','蘭'=>'蘭','虁'=>'蘷','蘿'=>'蘿','⾌'=>'虍','虐'=>'虐','虜'=>'虜','虜'=>'虜','虧'=>'虧','虩'=>'虩','⾍'=>'虫','蚈'=>'蚈','蚩'=>'蚩','蛢'=>'蛢','蜎'=>'蜎','蜨'=>'蜨','蝫'=>'蝫','蝹'=>'蝹','蝹'=>'蝹','螆'=>'螆','螺'=>'螺','蟡'=>'蟡','蠁'=>'蠁','蠟'=>'蠟','⾎'=>'血','行'=>'行','⾏'=>'行','衠'=>'衠','衣'=>'衣','⾐'=>'衣','裂'=>'裂','裏'=>'裏','裗'=>'裗','裞'=>'裞','裡'=>'裡','裸'=>'裸','裺'=>'裺','褐'=>'褐','襁'=>'襁','襤'=>'襤','⾑'=>'襾','覆'=>'覆','見'=>'見','⾒'=>'見','視'=>'視','視'=>'視','⾓'=>'角','⾔'=>'言','䚶'=>'訞','詽'=>'訮','誠'=>'誠','說'=>'說','說'=>'說','調'=>'調','請'=>'請','諒'=>'諒','論'=>'論','諭'=>'諭','諭'=>'諭','諸'=>'諸','諸'=>'諸','諾'=>'諾','諾'=>'諾','謁'=>'謁','謁'=>'謁','謹'=>'謹','謹'=>'謹','識'=>'識','讀'=>'讀','讏'=>'讆','變'=>'變','變'=>'變','⾕'=>'谷','⾖'=>'豆','豈'=>'豈','豕'=>'豕','⾗'=>'豕','⾘'=>'豸','⾙'=>'貝','貫'=>'貫','賁'=>'賁','賂'=>'賂','賈'=>'賈','賓'=>'賓','贈'=>'贈','贈'=>'贈','贛'=>'贛','⾚'=>'赤','⾛'=>'走','起'=>'起','趆'=>'赿','⾜'=>'足','趼'=>'趼','跋'=>'跋','跺'=>'跥','路'=>'路','跰'=>'跰','躛'=>'躗','⾝'=>'身','車'=>'車','⾞'=>'車','軔'=>'軔','輧'=>'軿','輦'=>'輦','輪'=>'輪','輸'=>'輸','輸'=>'輸','輻'=>'輻','轢'=>'轢','⾟'=>'辛','辞'=>'辞','辰'=>'辰','⾠'=>'辰','⾡'=>'辵','辶'=>'辶','⻌'=>'辶','連'=>'連','逸'=>'逸','逸'=>'逸','遲'=>'遲','遼'=>'遼','邏'=>'邏','⾢'=>'邑','邔'=>'邔','郎'=>'郎','郱'=>'郱','都'=>'都','鄑'=>'鄑','鄛'=>'鄛','⾣'=>'酉','酪'=>'酪','醙'=>'醙','醴'=>'醴','⾤'=>'釆','里'=>'里','⾥'=>'里','量'=>'量','金'=>'金','⾦'=>'金','鈴'=>'鈴','鈸'=>'鈸','鉶'=>'鉶','鉼'=>'鉼','鋗'=>'鋗','鋘'=>'鋘','錄'=>'錄','鍊'=>'鍊','鎮'=>'鎭','鏹'=>'鏹','鐕'=>'鐕','⾧'=>'長','⾨'=>'門','開'=>'開','閭'=>'閭','閷'=>'閷','⾩'=>'阜','阮'=>'阮','陋'=>'陋','降'=>'降','陵'=>'陵','陸'=>'陸','陼'=>'陼','隆'=>'隆','隣'=>'隣','⾪'=>'隶','隸'=>'隸','⾫'=>'隹','雃'=>'雃','離'=>'離','難'=>'難','難'=>'難','⾬'=>'雨','零'=>'零','雷'=>'雷','霣'=>'霣','露'=>'露','靈'=>'靈','⾭'=>'靑','靖'=>'靖','靖'=>'靖','⾮'=>'非','⾯'=>'面','⾰'=>'革','⾱'=>'韋','韛'=>'韛','韠'=>'韠','⾲'=>'韭','⾳'=>'音','響'=>'響','響'=>'響','⾴'=>'頁','頋'=>'頋','頋'=>'頋','頋'=>'頋','領'=>'領','頩'=>'頩','頻'=>'頻','頻'=>'頻','類'=>'類','⾵'=>'風','⾶'=>'飛','⻝'=>'食','⾷'=>'食','飢'=>'飢','飯'=>'飯','飼'=>'飼','館'=>'館','餩'=>'餩','⾸'=>'首','⾹'=>'香','馧'=>'馧','⾺'=>'馬','駂'=>'駂','駱'=>'駱','駾'=>'駾','驪'=>'驪','⾻'=>'骨','⾼'=>'高','⾽'=>'髟','鬒'=>'鬒','鬒'=>'鬒','⾾'=>'鬥','⾿'=>'鬯','⿀'=>'鬲','⿁'=>'鬼','⿂'=>'魚','魯'=>'魯','鱀'=>'鱀','鱗'=>'鱗','⿃'=>'鳥','鳽'=>'鳽','鵧'=>'鵧','鶴'=>'鶴','鷺'=>'鷺','鸞'=>'鸞','鹃'=>'鹂','⿄'=>'鹵','鹿'=>'鹿','⿅'=>'鹿','麗'=>'麗','麟'=>'麟','⿆'=>'麥','麻'=>'麻','⿇'=>'麻','⿈'=>'黃','⿉'=>'黍','黎'=>'黎','⿊'=>'黑','黹'=>'黹','⿋'=>'黹','⿌'=>'黽','黾'=>'黾','鼅'=>'鼅','⿍'=>'鼎','鼏'=>'鼏','⿎'=>'鼓','鼖'=>'鼖','⿏'=>'鼠','鼻'=>'鼻','⿐'=>'鼻','齃'=>'齃','⿑'=>'齊','⿒'=>'齒','龍'=>'龍','⿓'=>'龍','龎'=>'龎','龜'=>'龜','龜'=>'龜','龜'=>'龜','⿔'=>'龜','⻳'=>'龟','⿕'=>'龠','㒞'=>'㒞','㒹'=>'㒹','㒻'=>'㒻','㓟'=>'㓟','㔕'=>'㔕','䎛'=>'㖈','㛮'=>'㛮','㛼'=>'㛼','㞁'=>'㞁','㠯'=>'㠯','㡢'=>'㡢','㡼'=>'㡼','㣇'=>'㣇','㣣'=>'㣣','㤜'=>'㤜','㤺'=>'㤺','㨮'=>'㨮','㩬'=>'㩬','㫤'=>'㫤','㬈'=>'㬈','㬙'=>'㬙','䐠'=>'㬻','㭉'=>'㭉','㮝'=>'㮝','㮝'=>'㮝','㰘'=>'㰘','㱎'=>'㱎','㴳'=>'㴳','㶖'=>'㶖','㺬'=>'㺬','㺸'=>'㺸','㺸'=>'㺸','㼛'=>'㼛','㿼'=>'㿼','䀈'=>'䀈','䀘'=>'䀘','䀹'=>'䀹','䀹'=>'䀹','䁆'=>'䁆','䂖'=>'䂖','䃣'=>'䃣','䄯'=>'䄯','䈂'=>'䈂','䈧'=>'䈧','䊠'=>'䊠','䌁'=>'䌁','䌴'=>'䌴','䍙'=>'䍙','䏕'=>'䏕','䏙'=>'䏙','䐋'=>'䐋','䑫'=>'䑫','䔫'=>'䔫','䕝'=>'䕝','䕡'=>'䕡','䕫'=>'䕫','䗗'=>'䗗','䗹'=>'䗹','䘵'=>'䘵','䚾'=>'䚾','䛇'=>'䛇','䦕'=>'䦕','䧦'=>'䧦','䩮'=>'䩮','䩶'=>'䩶','䪲'=>'䪲','䬳'=>'䬳','䯎'=>'䯎','䳎'=>'䳎','䳭'=>'䳭','䳸'=>'䳸','䵖'=>'䵖','𠄢'=>'𠄢','𠔜'=>'𠔜','𠔥'=>'𠔥','𠕋'=>'𠕋','𠘺'=>'𠘺','𠠄'=>'𠠄','𠣞'=>'𠣞','𠨬'=>'𠨬','𠭣'=>'𠭣','𡓤'=>'𡓤','𡚨'=>'𡚨','𡛪'=>'𡛪','𡧈'=>'𡧈','𡬘'=>'𡬘','𡴋'=>'𡴋','𡷤'=>'𡷤','𡷦'=>'𡷦','𢆃'=>'𢆃','𢆟'=>'𢆟','𢌱'=>'𢌱','𢌱'=>'𢌱','𢛔'=>'𢛔','𢡄'=>'𢡄','𢡊'=>'𢡊','𢬌'=>'𢬌','𢯱'=>'𢯱','𣀊'=>'𣀊','𣊸'=>'𣊸','𣍟'=>'𣍟','𣎓'=>'𣎓','𣎜'=>'𣎜','𣏃'=>'𣏃','𣏕'=>'𣏕','𣑭'=>'𣑭','𣚣'=>'𣚣','𣢧'=>'𣢧','𣪍'=>'𣪍','𣫺'=>'𣫺','𣲼'=>'𣲼','𣴞'=>'𣴞','𣻑'=>'𣻑','𣽞'=>'𣽞','𣾎'=>'𣾎','𤉣'=>'𤉣','𤎫'=>'𤎫','𤘈'=>'𤘈','𤜵'=>'𤜵','𤠔'=>'𤠔','𤰶'=>'𤰶','𤲒'=>'𤲒','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'𥁄','𥃲'=>'𥃲','𥃳'=>'𥃳','𥄙'=>'𥄙','𥄳'=>'𥄳','𥉉'=>'𥉉','𥐝'=>'𥐝','𥘦'=>'𥘦','𥚚'=>'𥚚','𥛅'=>'𥛅','𥥼'=>'𥥼','𥪧'=>'𥪧','𥪧'=>'𥪧','𥮫'=>'𥮫','𥲀'=>'𥲀','𥳐'=>'𥳐','𥾆'=>'𥾆','𦇚'=>'𦇚','𦈨'=>'𦈨','𦉇'=>'𦉇','𦋙'=>'𦋙','𦌾'=>'𦌾','𦓚'=>'𦓚','𦔣'=>'𦔣','𦖨'=>'𦖨','𦞧'=>'𦞧','𦞵'=>'𦞵','𦬼'=>'𦬼','𦰶'=>'𦰶','𦳕'=>'𦳕','𦵫'=>'𦵫','𦼬'=>'𦼬','𦾱'=>'𦾱','𧃒'=>'𧃒','𧏊'=>'𧏊','𧙧'=>'𧙧','𧢮'=>'𧢮','𧥦'=>'𧥦','𧲨'=>'𧲨','𧻓'=>'𧻓','𧼯'=>'𧼯','𨗒'=>'𨗒','𨗭'=>'𨗭','𨜮'=>'𨜮','𨯺'=>'𨯺','𨵷'=>'𨵷','𩅅'=>'𩅅','𩇟'=>'𩇟','𩈚'=>'𩈚','𩐊'=>'𩐊','𩒖'=>'𩒖','𩖶'=>'𩖶','𩬰'=>'𩬰','𪃎'=>'𪃎','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','𪎒'=>'𪎒','𪘀'=>'𪘀','℃'=>'°C','℉'=>'°F','ℇ'=>'Ɛ','℻'=>'FAX','ℕ'=>'N','№'=>'No','ℚ'=>'Q','₨'=>'Rs','𝐓'=>'T','℡'=>'TEL','𝐔'=>'U','𝐖'=>'W','₩'=>'W̵','𝐗'=>'X','¥'=>'Y̵','𝚲'=>'Λ','𝚵'=>'Ξ','ℿ'=>'Π','ϲ'=>'c','ϒ'=>'Y','𝚽'=>'Φ','𝚿'=>'Ψ','ѣ'=>'Ь̵','ਃ'=>'ঃ','ಃ'=>'ః','່'=>'่','់'=>'่','້'=>'้','໊'=>'๊','໋'=>'๋','៕'=>'๚','៚'=>'๛','ъ'=>'ˉb','៙'=>'๏','೧'=>'౧','૨'=>'२','೨'=>'౨','૩'=>'३','૪'=>'४','૮'=>'८','೯'=>'౯','а'=>'a','Ꮟ'=>'b','ᖯ'=>'b','с'=>'c','ԁ'=>'d','ᑯ'=>'d','е'=>'e','ә'=>'ǝ','ε'=>'ɛ','є'=>'ɛ','ք'=>'f','ց'=>'g','һ'=>'h','հ'=>'h','Ꮒ'=>'h','Ᏺ'=>'h̔','ι'=>'i','і'=>'i','Ꭵ'=>'i','ј'=>'j','յ'=>'j','ᗰ'=>'m','ո'=>'n','η'=>'n̩','ం'=>'o','ಂ'=>'o','ം'=>'o','०'=>'o','੦'=>'o','૦'=>'o','๐'=>'o','໐'=>'o','ο'=>'o','о'=>'o','օ'=>'o','ဝ'=>'o','ρ'=>'p','р'=>'p','ᴩ'=>'ᴘ','գ'=>'q','κ'=>'ĸ','к'=>'ĸ','ᴦ'=>'r','г'=>'r','ѕ'=>'s','υ'=>'u','ս'=>'u','ν'=>'v','ѵ'=>'v','Ꮃ'=>'w','ᗯ'=>'w','х'=>'x','ᕁ'=>'x','у'=>'y','Ꭹ'=>'y','ӡ'=>'ʒ','ჳ'=>'ʒ','ϩ'=>'ƨ','ь'=>'ƅ','ы'=>'ƅi','ɑ'=>'α','ծ'=>'δ','ᕷ'=>'δ','п'=>'π','ɸ'=>'φ','ф'=>'φ','ʙ'=>'в','ɜ'=>'з','ᴍ'=>'м','ʜ'=>'н','ɢ'=>'ԍ','ᴛ'=>'т','ᴙ'=>'я','ઽ'=>'ऽ','ુ'=>'ु','ૂ'=>'ू','ੋ'=>'ॆ','੍'=>'्','્'=>'्','ഉ'=>'உ','ജ'=>'ஐ','ണ'=>'ண','ഴ'=>'ழ','ി'=>'ி','ു'=>'ூ','ಅ'=>'అ','ಆ'=>'ఆ','ಇ'=>'ఇ','ಒ'=>'ఒ','ಓ'=>'ఒౕ','ಜ'=>'జ','ಞ'=>'ఞ','ಣ'=>'ణ','థ'=>'ధּ','ಯ'=>'య','ఠ'=>'రּ','ಱ'=>'ఱ','ಲ'=>'ల','ඌ'=>'ന്ന','ஶ'=>'ശ','ຈ'=>'จ','ບ'=>'บ','ປ'=>'ป','ຝ'=>'ฝ','ພ'=>'พ','ຟ'=>'ฟ','ຍ'=>'ย','។'=>'ฯ','ិ'=>'ิ','ី'=>'ี','ឹ'=>'ึ','ឺ'=>'ื','ຸ'=>'ุ','ູ'=>'ู','ᗅ'=>'A','ᒍ'=>'J','ᕼ'=>'H','ᐯ'=>'V','ᑭ'=>'P','ᗷ'=>'B','ヘ'=>'へ','𐏑'=>'𐎂','𐏓'=>'𐎓','𒀸'=>'𐎚','ᅳ'=>'一','ǀ'=>'丨','ᅵ'=>'丨','Ꭺ'=>'A','Ᏼ'=>'B','Ꮯ'=>'C','ᗞ'=>'D','Ꭼ'=>'E','ᖴ'=>'F','Ꮐ'=>'G','Ꮋ'=>'H','Ꭻ'=>'J','Ꮶ'=>'K','Ꮮ'=>'L','Ꮇ'=>'M','Ꮲ'=>'P','ᖇ'=>'R','Ꮥ'=>'S','Ꮩ'=>'V','Ꮓ'=>'Z');
-
-?> \ No newline at end of file
diff --git a/phpBB/install/data/new_normalizer.php b/phpBB/install/data/new_normalizer.php
deleted file mode 100644
index e266f73408..0000000000
--- a/phpBB/install/data/new_normalizer.php
+++ /dev/null
@@ -1,196 +0,0 @@
-<?php
-/**
-*
-* @package install
-* @version $Id$
-* @copyright (c) 2007 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* A wrapper function for the normalizer which takes care of including the class if required and modifies the passed strings
-* to be in NFC (Normalization Form Composition).
-*
-* @param mixed $strings a string or an array of strings to normalize
-* @return mixed the normalized content, preserving array keys if array given.
-*/
-function utf8_new_normalize_nfc($strings)
-{
- if (empty($strings))
- {
- return $strings;
- }
-
- if (!is_array($strings))
- {
- utf_new_normalizer::nfc($strings);
- }
- else if (is_array($strings))
- {
- foreach ($strings as $key => $string)
- {
- if (is_array($string))
- {
- foreach ($string as $_key => $_string)
- {
- utf_new_normalizer::nfc($strings[$key][$_key]);
- }
- }
- else
- {
- utf_new_normalizer::nfc($strings[$key]);
- }
- }
- }
-
- return $strings;
-}
-
-class utf_new_normalizer
-{
- /**
- * Validate, cleanup and normalize a string
- *
- * The ultimate convenience function! Clean up invalid UTF-8 sequences,
- * and convert to Normal Form C, canonical composition.
- *
- * @param string &$str The dirty string
- * @return string The same string, all shiny and cleaned-up
- */
- function cleanup(&$str)
- {
- // The string below is the list of all autorized characters, sorted by frequency in latin text
- $pos = strspn($str, "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x0D");
- $len = strlen($str);
-
- if ($pos == $len)
- {
- // ASCII strings with no special chars return immediately
- return;
- }
-
- // 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);
- }
-
- if (!isset($GLOBALS['utf_canonical_decomp']))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
- }
-
- // Replace any byte in the range 0x00..0x1F, except for \r, \n and \t
- // We replace those characters with a 0xFF byte, which is illegal in UTF-8 and will in turn be replaced with a UTF replacement char
- $str = strtr(
- $str,
- "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F",
- "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
- );
-
- $str = utf_new_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
- }
-
- /**
- * Validate and normalize a UTF string to NFC
- *
- * @param string &$str Unchecked UTF string
- * @return string The string, validated and in normal form
- */
- function nfc(&$str)
- {
- $pos = strspn($str, UTF8_ASCII_RANGE);
- $len = strlen($str);
-
- if ($pos == $len)
- {
- // ASCII strings return immediately
- return;
- }
-
- if (!isset($GLOBALS['utf_nfc_qc']))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
- }
-
- if (!isset($GLOBALS['utf_canonical_decomp']))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
- }
-
- $str = utf_new_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
- }
-
- /**
- * Validate and normalize a UTF string to NFKC
- *
- * @param string &$str Unchecked UTF string
- * @return string The string, validated and in normal form
- */
- function nfkc(&$str)
- {
- $pos = strspn($str, UTF8_ASCII_RANGE);
- $len = strlen($str);
-
- if ($pos == $len)
- {
- // ASCII strings return immediately
- return;
- }
-
- if (!isset($GLOBALS['utf_nfkc_qc']))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/data/utf_nfkc_qc.' . $phpEx);
- }
-
- if (!isset($GLOBALS['utf_compatibility_decomp']))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx);
- }
-
- $str = utf_new_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
- }
-
- /**
- * Recompose a UTF string
- *
- * @param string $str Unchecked UTF string
- * @param integer $pos Position of the first UTF char (in bytes)
- * @param integer $len Length of the string (in bytes)
- * @param array &$qc Quick-check array, passed by reference but never modified
- * @param array &$decomp_map Decomposition mapping, passed by reference but never modified
- * @return string The string, validated and recomposed
- *
- * @access private
- */
- function recompose($str, $pos, $len, &$qc, &$decomp_map)
- {
- global $utf_canonical_comp;
-
- // 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);
- }
-
- return utf_normalizer::recompose($str, $pos, $len, $qc, $decomp_map);
- }
-}
-
-?> \ No newline at end of file
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index fc9ce65dac..82a491fc08 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -83,7 +83,7 @@ else
}
$user = new user();
-$cache = new cache();
+$cache = new acm();
$db = new $sql_db();
// Add own hook handler, if present. :o
@@ -92,7 +92,7 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
- foreach ($cache->obtain_hooks() as $hook)
+ foreach (cache::obtain_hooks() as $hook)
{
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
}
@@ -337,142 +337,6 @@ $unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP');
// Only an example, but also commented out
$database_update_info = array(
- // Changes from 3.0.RC2 to the next version
- '3.0.RC2' => array(
- // Change the following columns
- 'change_columns' => array(
- BANLIST_TABLE => array(
- 'ban_reason' => array('VCHAR_UNI', ''),
- 'ban_give_reason' => array('VCHAR_UNI', ''),
- ),
- ),
- ),
- // Changes from 3.0.RC3 to the next version
- '3.0.RC3' => array(
- // Change the following columns
- 'change_columns' => array(
- BANLIST_TABLE => array(
- 'ban_reason' => array('VCHAR_UNI', ''),
- 'ban_give_reason' => array('VCHAR_UNI', ''),
- ),
- STYLES_TABLE => array(
- 'style_id' => array('USINT', 0),
- 'template_id' => array('USINT', 0),
- 'theme_id' => array('USINT', 0),
- 'imageset_id' => array('USINT', 0),
- ),
- STYLES_TEMPLATE_TABLE => array(
- 'template_id' => array('USINT', 0),
- ),
- STYLES_TEMPLATE_DATA_TABLE => array(
- 'template_id' => array('USINT', 0),
- ),
- STYLES_THEME_TABLE => array(
- 'theme_id' => array('USINT', 0),
- ),
- STYLES_IMAGESET_TABLE => array(
- 'imageset_id' => array('USINT', 0),
- ),
- STYLES_IMAGESET_DATA_TABLE => array(
- 'imageset_id' => array('USINT', 0),
- ),
- USERS_TABLE => array(
- 'user_style' => array('USINT', 0),
- ),
- FORUMS_TABLE => array(
- 'forum_style' => array('USINT', 0),
- ),
- GROUPS_TABLE => array(
- 'group_avatar_type' => array('TINT:2', 0),
- 'group_avatar_width' => array('USINT', 0),
- 'group_avatar_height' => array('USINT', 0),
- ),
- ),
- ),
- // Changes from 3.0.RC4 to the next version
- '3.0.RC4' => array(
- // Change the following columns
- 'change_columns' => array(
- STYLES_TABLE => array(
- 'style_id' => array('USINT', NULL, 'auto_increment'),
- 'template_id' => array('USINT', 0),
- 'theme_id' => array('USINT', 0),
- 'imageset_id' => array('USINT', 0),
- ),
- STYLES_TEMPLATE_TABLE => array(
- 'template_id' => array('USINT', NULL, 'auto_increment'),
- ),
- STYLES_TEMPLATE_DATA_TABLE => array(
- 'template_id' => array('USINT', 0),
- ),
- STYLES_THEME_TABLE => array(
- 'theme_id' => array('USINT', NULL, 'auto_increment'),
- ),
- STYLES_IMAGESET_TABLE => array(
- 'imageset_id' => array('USINT', NULL, 'auto_increment'),
- ),
- STYLES_IMAGESET_DATA_TABLE => array(
- 'imageset_id' => array('USINT', 0),
- ),
- USERS_TABLE => array(
- 'user_style' => array('USINT', 0),
- ),
- FORUMS_TABLE => array(
- 'forum_style' => array('USINT', 0),
- ),
- GROUPS_TABLE => array(
- 'group_avatar_width' => array('USINT', 0),
- 'group_avatar_height' => array('USINT', 0),
- ),
- ),
- ),
- // Changes from 3.0.RC5 to the next version
- '3.0.RC5' => array(
- // Add the following columns
- 'add_columns' => array(
- USERS_TABLE => array(
- 'user_form_salt' => array('VCHAR_UNI:32', ''),
- ),
- ),
- // Change the following columns
- 'change_columns' => array(
- POSTS_TABLE => array(
- 'bbcode_uid' => array('VCHAR:8', ''),
- ),
- PRIVMSGS_TABLE => array(
- 'bbcode_uid' => array('VCHAR:8', ''),
- ),
- USERS_TABLE => array(
- 'user_sig_bbcode_uid' => array('VCHAR:8', ''),
- ),
- ),
- ),
- // Changes from 3.0.RC6 to the next version
- '3.0.RC6' => array(
- // Change the following columns
- 'change_columns' => array(
- FORUMS_TABLE => array(
- 'forum_desc_uid' => array('VCHAR:8', ''),
- 'forum_rules_uid' => array('VCHAR:8', ''),
- ),
- GROUPS_TABLE => array(
- 'group_desc_uid' => array('VCHAR:8', ''),
- ),
- USERS_TABLE => array(
- 'user_newpasswd' => array('VCHAR_UNI:40', ''),
- ),
- ),
- ),
- // Changes from 3.0.RC8 to the next version
- '3.0.RC8' => array(
- // Change the following columns
- 'change_columns' => array(
- USERS_TABLE => array(
- 'user_new_privmsg' => array('INT:4', 0),
- 'user_unread_privmsg' => array('INT:4', 0),
- ),
- ),
- ),
);
// Determine mapping database type
@@ -581,440 +445,6 @@ else
// Checks/Operations that have to be completed prior to starting the update itself
$exit = false;
-if (version_compare($current_version, '3.0.RC8', '<='))
-{
- // Define missing language entries...
- if (!isset($lang['CLEANING_USERNAMES']))
- {
- $lang = array_merge($lang, array(
- 'CLEANING_USERNAMES' => 'Cleaning usernames',
- 'LONG_SCRIPT_EXECUTION' => 'Please note that this can take a while... Please do not stop the script.',
- 'CHANGE_CLEAN_NAMES' => 'The method used to make sure a username is not used by multiple users has been changed. There are some users which have the same name when compared with the new method. You have to delete or rename these users to make sure that each name is only used by one user before you can proceed.',
- 'USER_ACTIVE' => 'Active user',
- 'USER_INACTIVE' => 'Inactive user',
- 'BOT' => 'Spider/Robot',
- 'UPDATE_REQUIRES_FILE' => 'The updater requires that the following file is present: %s',
-
- 'DELETE_USER_REMOVE' => 'Delete user and remove posts',
- 'DELETE_USER_RETAIN' => 'Delete user but keep posts',
- 'EDIT_USERNAME' => 'Edit username',
- 'KEEP_OLD_NAME' => 'Keep username',
- 'NEW_USERNAME' => 'New username',
- ));
- }
-?>
- <br /><br />
-
- <h1><?php echo $lang['CLEANING_USERNAMES']; ?></h1>
-
- <br />
-
-<?php
- flush();
-
- $submit = (isset($_POST['resolve_conflicts'])) ? true : false;
- $modify_users = request_var('modify_users', array(0 => ''));
- $new_usernames = request_var('new_usernames', array(0 => ''), true);
-
- if (!class_exists('utf_new_normalizer'))
- {
- if (!file_exists($phpbb_root_path . 'install/data/new_normalizer.' . $phpEx))
- {
- global $lang;
- trigger_error(sprintf($lang['UPDATE_REQUIRES_FILE'], $phpbb_root_path . 'install/data/new_normalizer.' . $phpEx), E_USER_ERROR);
- }
- include($phpbb_root_path . 'install/data/new_normalizer.' . $phpEx);
- }
-
- // the admin decided to change some usernames
- if (sizeof($modify_users) && $submit)
- {
- $sql = 'SELECT user_id, username, user_type
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', array_keys($modify_users));
- $result = $db->sql_query($sql);
-
- $users = 0;
- while ($row = $db->sql_fetchrow($result))
- {
- $users++;
- $user_id = (int) $row['user_id'];
-
- if (isset($modify_users[$user_id]))
- {
- $row['action'] = $modify_users[$user_id];
- $modify_users[$user_id] = $row;
- }
- }
- $db->sql_freeresult($result);
-
- // only if all ids really existed
- if (sizeof($modify_users) == $users)
- {
- $user->data['user_id'] = ANONYMOUS;
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- foreach ($modify_users as $user_id => $row)
- {
- switch ($row['action'])
- {
- case 'edit':
- if (isset($new_usernames[$user_id]))
- {
- $data = array('username' => utf8_new_normalize_nfc($new_usernames[$user_id]));
- // Need to update config, forum, topic, posting, messages, etc.
- if ($data['username'] != $row['username'])
- {
- $check_ary = array('username' => array(
- array('string', false, $config['min_name_chars'], $config['max_name_chars']),
- array('username'),
- ));
- // need a little trick for this to work properly
- $user->data['username_clean'] = utf8_clean_string($data['username']) . 'a';
- $errors = validate_data($data, $check_ary);
-
- if ($errors)
- {
- include($phpbb_root_path . 'language/' . $language . '/ucp.' . $phpEx);
- echo '<div class="errorbox">';
- foreach ($errors as $error)
- {
- echo '<p>' . $lang[$error] . '</p>';
- }
- echo '</div>';
- }
-
- if (!$errors)
- {
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', array(
- 'username' => $data['username'],
- 'username_clean' => utf8_clean_string($data['username'])
- )) . '
- WHERE user_id = ' . $user_id;
- $db->sql_query($sql);
-
- add_log('user', $user_id, 'LOG_USER_UPDATE_NAME', $row['username'], $data['username']);
- user_update_name($row['username'], $data['username']);
- }
- }
- }
- break;
-
- case 'delete_retain':
- case 'delete_remove':
- if ($user_id != ANONYMOUS && $row['user_type'] != USER_FOUNDER)
- {
- user_delete(substr($row['action'], 7), $user_id, $row['username']);
- add_log('admin', 'LOG_USER_DELETED', $row['username']);
- }
- break;
- }
- }
- }
- }
-?>
-
- <p><?php echo $lang['LONG_SCRIPT_EXECUTION']; ?></p>
- <p><?php echo $lang['PROGRESS']; ?> :: <strong>
-
-<?php
- flush();
-
- // after RC3 a different utf8_clean_string function is used, this requires that
- // the unique column username_clean is recalculated, during this recalculation
- // duplicates might be created. Since the column has to be unique such usernames
- // must not exist. We need identify them and let the admin decide what to do
- // about them.
- // After RC8 this was changed again, but this time only usernames containing spaces
- // are affected.
- $sql_where = (version_compare($current_version, '3.0.RC4', '<=')) ? '' : "WHERE username_clean LIKE '% %'";
- $sql = 'SELECT user_id, username, username_clean
- FROM ' . USERS_TABLE . "
- $sql_where
- ORDER BY user_id ASC";
- $result = $db->sql_query($sql);
-
- $colliding_users = $found_names = array();
- $echos = 0;
-
- while ($row = $db->sql_fetchrow($result))
- {
- // Calculate the new clean name. If it differs from the old one we need
- // to make sure there is no collision
- $clean_name = utf8_new_clean_string($row['username']);
-
- if ($clean_name != $row['username_clean'])
- {
- // Check if there would be a collission, if not put it up for changing
- $user_id = (int) $row['user_id'];
-
- // If this clean name was not the result of another user already ...
- if (!isset($found_names[$clean_name]))
- {
- // then we need to figure out whether there are any other users
- // who already had this clean name with the old version
- $sql = 'SELECT user_id, username
- FROM ' . USERS_TABLE . '
- WHERE username_clean = \'' . $db->sql_escape($clean_name) . '\'';
- $result2 = $db->sql_query($sql);
-
- $user_ids = array($user_id);
- while ($row = $db->sql_fetchrow($result2))
- {
- // For not trimmed entries this could happen, yes. ;)
- if ($row['user_id'] == $user_id)
- {
- continue;
- }
-
- // Make sure this clean name will still be the same with the
- // new function. If it is, then we have to add it to the list
- // of user ids for this clean name
- if (utf8_new_clean_string($row['username']) == $clean_name)
- {
- $user_ids[] = (int) $row['user_id'];
- }
- }
- $db->sql_freeresult($result2);
-
- // if we already found a collision save it
- if (sizeof($user_ids) > 1)
- {
- $colliding_users[$clean_name] = $user_ids;
- $found_names[$clean_name] = true;
- }
- else
- {
- // otherwise just mark this name as found
- $found_names[$clean_name] = $user_id;
- }
- }
- // Else, if we already found the username
- else
- {
- // If the value in the found_names lookup table is only true ...
- if ($found_names[$clean_name] === true)
- {
- // then the actual data was already added to $colliding_users
- // and we only need to append the user_id
- $colliding_users[$clean_name][] = $user_id;
- }
- else
- {
- // otherwise it still keeps the first user_id for this name
- // and we need to move the data to $colliding_users, and set
- // the value in the found_names lookup table to true, so
- // following users will directly be appended to $colliding_users
- $colliding_users[$clean_name] = array($found_names[$clean_name], $user_id);
- $found_names[$clean_name] = true;
- }
- }
- }
-
- if (($echos % 1000) == 0)
- {
- echo '.';
- flush();
- }
- $echos++;
- }
- $db->sql_freeresult($result);
-
- _write_result(false, $errored, $error_ary);
-
- // now retrieve all information about the users and let the admin decide what to do
- if (sizeof($colliding_users))
- {
- $exit = true;
- include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
- include($phpbb_root_path . 'language/' . $language . '/memberlist.' . $phpEx);
- include($phpbb_root_path . 'language/' . $language . '/acp/users.' . $phpEx);
-
- // link a few things to the correct place so we don't get any problems
- $user->lang = &$lang;
- $user->data['user_id'] = ANONYMOUS;
- $user->date_format = $config['default_dateformat'];
-
- // a little trick to get all user_ids
- $user_ids = call_user_func_array('array_merge', array_values($colliding_users));
-
- $sql = 'SELECT session_user_id, MAX(session_time) AS session_time
- FROM ' . SESSIONS_TABLE . '
- WHERE session_time >= ' . (time() - $config['session_length']) . '
- AND ' . $db->sql_in_set('session_user_id', $user_ids) . '
- GROUP BY session_user_id';
- $result = $db->sql_query($sql);
-
- $session_times = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $session_times[$row['session_user_id']] = $row['session_time'];
- }
- $db->sql_freeresult($result);
-
- $sql = 'SELECT *
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', $user_ids);
- $result = $db->sql_query($sql);
-
- $users = array();
- while ($row = $db->sql_fetchrow($result))
- {
- if (isset($session_times[$row['user_id']]))
- {
- $row['session_time'] = $session_times[$row['user_id']];
- }
- else
- {
- $row['session_time'] = 0;
- }
- $users[(int) $row['user_id']] = $row;
- }
- $db->sql_freeresult($result);
- unset($session_times);
-
- // now display a table with all users, some information about them and options
- // for the admin: keep name, change name (with text input) or delete user
- $u_action = "database_update.$phpEx?language=$language&amp;type=$inline_update";
-?>
-<br /><br />
-
-<p><?php echo $lang['CHANGE_CLEAN_NAMES']; ?></p>
-<form id="change_clean_names" method="post" action="<?php echo $u_action; ?>">
-
-
-<?php
- foreach ($colliding_users as $clean_name => $user_ids)
- {
-?>
- <fieldset class="tabulated">
- <table>
- <caption><?php echo sprintf($lang['COLLIDING_CLEAN_USERNAME'], $clean_name); ?></caption>
- <thead>
- <tr>
- <th><?php echo $lang['RANK']; ?> <?php echo $lang['USERNAME']; ?></th>
- <th><?php echo $lang['POSTS']; ?></th>
- <th><?php echo $lang['INFORMATION']; ?></th>
- <th><?php echo $lang['JOINED']; ?></th>
- <th><?php echo $lang['LAST_ACTIVE']; ?></th>
- <th><?php echo $lang['ACTION']; ?></th>
- <th><?php echo $lang['NEW_USERNAME']; ?></th>
- </tr>
- </thead>
- <tbody>
-<?php
- foreach ($user_ids as $i => $user_id)
- {
- $row = $users[$user_id];
-
- $rank_title = $rank_img = '';
- get_user_rank($row['user_rank'], $row['user_posts'], $rank_title, $rank_img, $rank_img_src);
-
- $last_visit = (!empty($row['session_time'])) ? $row['session_time'] : $row['user_lastvisit'];
-
- $info = '';
- switch ($row['user_type'])
- {
- case USER_INACTIVE:
- $info .= $lang['USER_INACTIVE'];
- break;
-
- case USER_IGNORE:
- $info .= $lang['BOT'];
- break;
-
- case USER_FOUNDER:
- $info .= $lang['FOUNDER'];
- break;
-
- default:
- $info .= $lang['USER_ACTIVE'];
- }
-
- if ($user_id == ANONYMOUS)
- {
- $info = $lang['GUEST'];
- }
-?>
- <tr class="bg<?php echo ($i % 2) + 1; ?>">
- <td>
- <span class="rank-img"><?php echo ($rank_img) ? $rank_img : $rank_title; ?></span><br />
- <?php echo get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); ?>
- </td>
- <td class="posts"><?php echo $row['user_posts']; ?></td>
- <td class="info"><?php echo $info; ?></td>
- <td><?php echo $user->format_date($row['user_regdate']) ?></td>
- <td><?php echo (empty($last_visit)) ? ' - ' : $user->format_date($last_visit); ?>&nbsp;</td>
- <td>
- <label><input type="radio" class="radio" id="keep_user_<?php echo $user_id; ?>" name="modify_users[<?php echo $user_id; ?>]" value="keep" checked="checked" /> <?php echo $lang['KEEP_OLD_NAME']; ?></label><br />
- <label><input type="radio" class="radio" id="edit_user_<?php echo $user_id; ?>" name="modify_users[<?php echo $user_id; ?>]" value="edit" /> <?php echo $lang['EDIT_USERNAME']; ?></label><br />
-<?php
- // some users must not be deleted
- if ($user_id != ANONYMOUS && $row['user_type'] != USER_FOUNDER)
- {
-?>
- <label><input type="radio" class="radio" id="delete_user_retain_<?php echo $user_id; ?>" name="modify_users[<?php echo $user_id; ?>]" value="delete_retain" /> <?php echo $lang['DELETE_USER_RETAIN']; ?></label><br />
- <label><input type="radio" class="radio" id="delete_user_remove_<?php echo $user_id; ?>" name="modify_users[<?php echo $user_id; ?>]" value="delete_remove" /> <?php echo $lang['DELETE_USER_REMOVE']; ?></label>
-<?php
- }
-?>
- </td>
- <td>
- <input id="new_username_<?php echo $user_id; ?>" type="text" name="new_usernames[<?php echo $user_id; ?>]" value="<?php echo $row['username']; ?>" />
- </td>
- </tr>
-<?php
- }
-?>
- </tbody>
- </table>
- </fieldset>
-<?php
- }
-?>
- <p class="quick">
- <input class="button2" id="resolve_conflicts" type="submit" name="resolve_conflicts" value="<?php echo $lang['SUBMIT']; ?>" />
- </p>
- </form>
-<?php
- }
- else if (sizeof($found_names))
- {
- $sql = 'SELECT user_id, username, username_clean
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', array_values($found_names));
- $result = $db->sql_query($sql);
-
- $found_names = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $clean_name = utf8_new_clean_string($row['username']);
-
- if ($clean_name != $row['username_clean'])
- {
- $user_id = (int) $row['user_id'];
- $found_names[$user_id] = $clean_name;
-
- // impossible unique clean name
- $sql = 'UPDATE ' . USERS_TABLE . "
- SET username_clean = ' {$user_id}'
- WHERE user_id = {$user_id}";
- $db->sql_query($sql);
- }
- }
- $db->sql_freeresult($result);
-
- foreach ($found_names as $user_id => $clean_name)
- {
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET username_clean = \'' . $db->sql_escape($clean_name) . '\'
- WHERE user_id = ' . $user_id;
- $db->sql_query($sql);
- }
- }
- unset($found_names);
- unset($colliding_users);
-}
if ($exit)
{
@@ -1178,374 +608,6 @@ flush();
$no_updates = true;
// some code magic
-if (version_compare($current_version, '3.0.RC2', '<='))
-{
- $smileys = array();
- $sql = 'SELECT smiley_id, code
- FROM ' . SMILIES_TABLE;
-
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $smileys[$row['smiley_id']] = $row['code'];
- }
- $db->sql_freeresult($result);
-
- foreach ($smileys as $id => $code)
- {
- // 2.0 only entitized lt and gt; We need to do something about double quotes.
- if (strchr($code, '"') === false)
- {
- continue;
- }
-
- $new_code = str_replace('&amp;', '&', $code);
- $new_code = str_replace('&lt;', '<', $new_code);
- $new_code = str_replace('&gt;', '>', $new_code);
- $new_code = utf8_htmlspecialchars($new_code);
-
- $sql = 'UPDATE ' . SMILIES_TABLE . '
- SET code = \'' . $db->sql_escape($new_code) . '\'
- WHERE smiley_id = ' . (int) $id;
- $db->sql_query($sql);
- }
-
- $index_list = sql_list_index($map_dbms, ACL_ROLES_DATA_TABLE);
-
- if (in_array('ath_opt_id', $index_list))
- {
- sql_index_drop($map_dbms, 'ath_opt_id', ACL_ROLES_DATA_TABLE);
- sql_create_index($map_dbms, 'ath_op_id', ACL_ROLES_DATA_TABLE, array('auth_option_id'));
- }
-
- $no_updates = false;
-}
-
-if (version_compare($current_version, '3.0.RC3', '<='))
-{
- if ($map_dbms === 'postgres')
- {
- $sql = "SELECT SETVAL('" . FORUMS_TABLE . "_seq',(select case when max(forum_id)>0 then max(forum_id)+1 else 1 end from " . FORUMS_TABLE . '));';
- _sql($sql, $errored, $error_ary);
- }
-
- // we check for:
- // ath_opt_id
- // ath_op_id
- // ACL_ROLES_DATA_TABLE_ath_opt_id
- // we want ACL_ROLES_DATA_TABLE_ath_op_id
-
- $table_index_fix = array(
- ACL_ROLES_DATA_TABLE => array(
- 'ath_opt_id' => 'ath_op_id',
- 'ath_op_id' => 'ath_op_id',
- ACL_ROLES_DATA_TABLE . '_ath_opt_id' => 'ath_op_id'
- ),
- STYLES_IMAGESET_DATA_TABLE => array(
- 'i_id' => 'i_d',
- 'i_d' => 'i_d',
- STYLES_IMAGESET_DATA_TABLE . '_i_id' => 'i_d'
- )
- );
-
- // we need to create some indicies...
- $needed_creation = array();
-
- foreach ($table_index_fix as $table_name => $index_info)
- {
- $index_list = sql_list_fake($map_dbms, $table_name);
- foreach ($index_info as $bad_index => $good_index)
- {
- if (in_array($bad_index, $index_list))
- {
- // mysql is actually OK, it won't get a hand in this crud
- switch ($map_dbms)
- {
- // last version, mssql had issues with index removal
- case 'mssql':
- $sql = 'DROP INDEX ' . $table_name . '.' . $bad_index;
- _sql($sql, $errored, $error_ary);
- break;
-
- // last version, firebird, oracle, postgresql and sqlite all got bad index names
- // we got kinda lucky, tho: they all support the same syntax
- case 'firebird':
- case 'oracle':
- case 'postgres':
- case 'sqlite':
- $sql = 'DROP INDEX ' . $bad_index;
- _sql($sql, $errored, $error_ary);
- break;
- }
-
- // If the good index already exist we do not need to create it again...
- if (($map_dbms == 'mysql_40' || $map_dbms == 'mysql_41') && $bad_index == $good_index)
- {
- }
- else
- {
- $needed_creation[$table_name][$good_index] = 1;
- }
- }
- }
- }
-
- $new_index_defs = array('ath_op_id' => array('auth_option_id'), 'i_d' => array('imageset_id'));
-
- foreach ($needed_creation as $bad_table => $index_repair_list)
- {
- foreach ($index_repair_list as $new_index => $garbage)
- {
- sql_create_index($map_dbms, $new_index, $bad_table, $new_index_defs[$new_index]);
- $no_updates = false;
- }
- }
-
- // Make sure empty smiley codes do not exist
- $sql = 'DELETE FROM ' . SMILIES_TABLE . "
- WHERE code = ''";
- _sql($sql, $errored, $error_ary);
-
- set_config('allow_birthdays', '1');
- set_config('cron_lock', '0', true);
-
- $no_updates = false;
-}
-
-if (version_compare($current_version, '3.0.RC4', '<='))
-{
- $update_auto_increment = array(
- STYLES_TABLE => 'style_id',
- STYLES_TEMPLATE_TABLE => 'template_id',
- STYLES_THEME_TABLE => 'theme_id',
- STYLES_IMAGESET_TABLE => 'imageset_id'
- );
-
- $sql = 'SELECT *
- FROM ' . STYLES_TABLE . '
- WHERE style_id = 0';
- $result = _sql($sql, $errored, $error_ary);
- $bad_style_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($bad_style_row)
- {
- $sql = 'SELECT MAX(style_id) as max_id
- FROM ' . STYLES_TABLE;
- $result = _sql($sql, $errored, $error_ary);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- $proper_id = $row['max_id'] + 1;
-
- _sql('UPDATE ' . STYLES_TABLE . " SET style_id = $proper_id WHERE style_id = 0", $errored, $error_ary);
- _sql('UPDATE ' . FORUMS_TABLE . " SET forum_style = $proper_id WHERE forum_style = 0", $errored, $error_ary);
- _sql('UPDATE ' . USERS_TABLE . " SET user_style = $proper_id WHERE user_style = 0", $errored, $error_ary);
-
- $sql = 'SELECT config_value
- FROM ' . CONFIG_TABLE . "
- WHERE config_name = 'default_style'";
- $result = _sql($sql, $errored, $error_ary);
- $style_config = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($style_config['config_value'] === '0')
- {
- set_config('default_style', (string) $proper_id);
- }
- }
-
- $sql = 'SELECT *
- FROM ' . STYLES_TEMPLATE_TABLE . '
- WHERE template_id = 0';
- $result = _sql($sql, $errored, $error_ary);
- $bad_style_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($bad_style_row)
- {
- $sql = 'SELECT MAX(template_id) as max_id
- FROM ' . STYLES_TEMPLATE_TABLE;
- $result = _sql($sql, $errored, $error_ary);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- $proper_id = $row['max_id'] + 1;
-
- _sql('UPDATE ' . STYLES_TABLE . " SET template_id = $proper_id WHERE template_id = 0", $errored, $error_ary);
- }
-
- $sql = 'SELECT *
- FROM ' . STYLES_THEME_TABLE . '
- WHERE theme_id = 0';
- $result = _sql($sql, $errored, $error_ary);
- $bad_style_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($bad_style_row)
- {
- $sql = 'SELECT MAX(theme_id) as max_id
- FROM ' . STYLES_THEME_TABLE;
- $result = _sql($sql, $errored, $error_ary);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- $proper_id = $row['max_id'] + 1;
-
- _sql('UPDATE ' . STYLES_TABLE . " SET theme_id = $proper_id WHERE theme_id = 0", $errored, $error_ary);
- }
-
- $sql = 'SELECT *
- FROM ' . STYLES_IMAGESET_TABLE . '
- WHERE imageset_id = 0';
- $result = _sql($sql, $errored, $error_ary);
- $bad_style_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($bad_style_row)
- {
- $sql = 'SELECT MAX(imageset_id) as max_id
- FROM ' . STYLES_IMAGESET_TABLE;
- $result = _sql($sql, $errored, $error_ary);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- $proper_id = $row['max_id'] + 1;
-
- _sql('UPDATE ' . STYLES_TABLE . " SET imageset_id = $proper_id WHERE imageset_id = 0", $errored, $error_ary);
- _sql('UPDATE ' . STYLES_IMAGESET_DATA_TABLE . " SET imageset_id = $proper_id WHERE imageset_id = 0", $errored, $error_ary);
- }
-
- if ($map_dbms == 'mysql_40' || $map_dbms == 'mysql_41')
- {
- foreach ($update_auto_increment as $auto_table_name => $auto_column_name)
- {
- $sql = "SELECT MAX({$auto_column_name}) as max_id
- FROM {$auto_table_name}";
- $result = _sql($sql, $errored, $error_ary);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- $max_id = ((int) $row['max_id']) + 1;
- _sql("ALTER TABLE {$auto_table_name} AUTO_INCREMENT = {$max_id}", $errored, $error_ary);
- }
-
- $no_updates = false;
- }
- else if ($map_dbms == 'postgres')
- {
- foreach ($update_auto_increment as $auto_table_name => $auto_column_name)
- {
- $sql = "SELECT SETVAL('" . $auto_table_name . "_seq',(select case when max({$auto_column_name})>0 then max({$auto_column_name})+1 else 1 end from " . $auto_table_name . '));';
- _sql($sql, $errored, $error_ary);
- }
-
- $sql = 'DROP SEQUENCE ' . STYLES_TEMPLATE_DATA_TABLE . '_seq';
- _sql($sql, $errored, $error_ary);
- }
- else if ($map_dbms == 'firebird')
- {
- $sql = 'DROP TRIGGER t_' . STYLES_TEMPLATE_DATA_TABLE;
- _sql($sql, $errored, $error_ary);
-
- $sql = 'DROP GENERATOR ' . STYLES_TEMPLATE_DATA_TABLE . '_gen';
- _sql($sql, $errored, $error_ary);
- }
- else if ($map_dbms == 'oracle')
- {
- $sql = 'DROP TRIGGER t_' . STYLES_TEMPLATE_DATA_TABLE;
- _sql($sql, $errored, $error_ary);
-
- $sql = 'DROP SEQUENCE ' . STYLES_TEMPLATE_DATA_TABLE . '_seq';
- _sql($sql, $errored, $error_ary);
- }
- else if ($map_dbms == 'mssql')
- {
- // we use transactions because we need to have a working DB at the end of all of this
- $db->sql_transaction('begin');
-
- $sql = 'SELECT *
- FROM ' . STYLES_TEMPLATE_DATA_TABLE;
- $result = _sql($sql, $errored, $error_ary);
- $old_style_rows = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $old_style_rows[] = $row;
- }
- $db->sql_freeresult($result);
-
- // death to the table, it is evil!
- $sql = 'DROP TABLE ' . STYLES_TEMPLATE_DATA_TABLE;
- _sql($sql, $errored, $error_ary);
-
- // the table of awesomeness, praise be to it (or something)
- $sql = 'CREATE TABLE [' . STYLES_TEMPLATE_DATA_TABLE . "] (
- [template_id] [int] DEFAULT (0) NOT NULL ,
- [template_filename] [varchar] (100) DEFAULT ('') NOT NULL ,
- [template_included] [varchar] (8000) DEFAULT ('') NOT NULL ,
- [template_mtime] [int] DEFAULT (0) NOT NULL ,
- [template_data] [text] DEFAULT ('') NOT NULL
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]";
- _sql($sql, $errored, $error_ary);
-
- // index? index
- $sql = 'CREATE INDEX [tid] ON [' . STYLES_TEMPLATE_DATA_TABLE . ']([template_id]) ON [PRIMARY]';
- _sql($sql, $errored, $error_ary);
-
- // yet another index
- $sql = 'CREATE INDEX [tfn] ON [' . STYLES_TEMPLATE_DATA_TABLE . ']([template_filename]) ON [PRIMARY]';
- _sql($sql, $errored, $error_ary);
-
- foreach ($old_style_rows as $return_row)
- {
- _sql('INSERT INTO ' . STYLES_TEMPLATE_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $return_row), $errored, $error_ary);
- }
-
- $db->sql_transaction('commit');
- }
-
- // Setting this here again because new installations may not have it...
- set_config('cron_lock', '0', true);
- set_config('ldap_port', '');
- set_config('ldap_user_filter', '');
-
- $no_updates = false;
-}
-
-if (version_compare($current_version, '3.0.RC5', '<='))
-{
- // In case the user is having the bot mediapartner google "as is", adjust it.
- $sql = 'UPDATE ' . BOTS_TABLE . "
- SET bot_agent = '" . $db->sql_escape('Mediapartners-Google') . "'
- WHERE bot_agent = '" . $db->sql_escape('Mediapartners-Google/') . "'";
- _sql($sql, $errored, $error_ary);
-
- set_config('form_token_lifetime', '7200');
- set_config('form_token_mintime', '0');
- set_config('min_time_reg', '5');
- set_config('min_time_terms', '2');
- set_config('form_token_sid_guests', '1');
-
- $db->sql_transaction('begin');
-
- $sql = 'SELECT forum_id, forum_password
- FROM ' . FORUMS_TABLE;
- $result = _sql($sql, $errored, $error_ary);
-
- while ($row = $db->sql_fetchrow($result))
- {
- if (!empty($row['forum_password']))
- {
- _sql('UPDATE ' . FORUMS_TABLE . " SET forum_password = '" . md5($row['forum_password']) . "' WHERE forum_id = {$row['forum_id']}", $errored, $error_ary);
- }
- }
- $db->sql_freeresult($result);
-
- $db->sql_transaction('commit');
-
- $no_updates = false;
-}
_write_result($no_updates, $errored, $error_ary);
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 60265d5a29..c2a1cd76ec 100755
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -22,9 +22,9 @@ $phpEx = substr(strrchr(__FILE__, '.'), 1);
error_reporting(E_ALL ^ E_NOTICE);
// @todo Review this test and see if we can find out what it is which prevents PHP 4.2.x from even displaying the page with requirements on it
-if (version_compare(PHP_VERSION, '4.3.3') < 0)
+if (version_compare(PHP_VERSION, '5.1.0') < 0)
{
- die('You are running an unsupported PHP version. Please upgrade to PHP 4.3.3 or higher before trying to install phpBB 3.0');
+ die('You are running an unsupported PHP version. Please upgrade to PHP 5.1.0 or higher before trying to install phpBB 3.0');
}
/*
@@ -238,7 +238,7 @@ set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handle
$user = new user();
$auth = new auth();
-$cache = new cache();
+$cache = new acm();
$template = new template();
// Add own hook handler, if present. :o
@@ -247,7 +247,7 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
- foreach ($cache->obtain_hooks() as $hook)
+ foreach (cache::obtain_hooks() as $hook)
{
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
}
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index f1544c931a..2fb34aee1d 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -68,7 +68,7 @@ class convert
var $p_master;
- function convert(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index bce3cec730..1546ed0886 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -141,7 +141,7 @@ class install_install extends module
// Test the minimum PHP version
$php_version = PHP_VERSION;
- if (version_compare($php_version, '4.3.3') < 0)
+ if (version_compare($php_version, '5.1.0') < 0)
{
$result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
}
@@ -246,6 +246,26 @@ class install_install extends module
'S_LEGEND' => false,
));
+ // Check for PCRE unicode property support
+ if (@preg_match('/\p{Ll}/u', 'a'))
+ {
+ $passed['pcre'] = true;
+ $result = '<strong style="color:green">' . $lang['YES'] . '</strong>';
+ }
+ else
+ {
+ $result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['PCRE_UNI_PROP_SUPPORT'],
+ 'TITLE_EXPLAIN' => $lang['PCRE_UNI_PROP_SUPPORT_EXPLAIN'],
+ 'RESULT' => $result,
+
+ 'S_EXPLAIN' => true,
+ 'S_LEGEND' => false,
+ ));
+
/**
* Better not enabling and adding to the loaded extensions due to the specific requirements needed
if (!@extension_loaded('mbstring'))
diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php
index 33aeccbc22..16fa7fdf6e 100644
--- a/phpBB/language/en/acp/search.php
+++ b/phpBB/language/en/acp/search.php
@@ -55,10 +55,6 @@ $lang = array_merge($lang, array(
'FULLTEXT_MYSQL_INCOMPATIBLE_VERSION' => 'The MySQL fulltext backend can only be used with MySQL4 and above.',
'FULLTEXT_MYSQL_NOT_MYISAM' => 'MySQL fulltext indexes can only be used with MyISAM tables.',
'FULLTEXT_MYSQL_TOTAL_POSTS' => 'Total number of indexed posts',
- 'FULLTEXT_MYSQL_MBSTRING' => 'Support for non-latin UTF-8 characters using mbstring:',
- 'FULLTEXT_MYSQL_PCRE' => 'Support for non-latin UTF-8 characters using PCRE:',
- 'FULLTEXT_MYSQL_MBSTRING_EXPLAIN' => 'If PCRE does not have unicode character properties, the search backend will try to use mbstring’s regular expression engine.',
- 'FULLTEXT_MYSQL_PCRE_EXPLAIN' => 'This search backend requires PCRE unicode character properties, only available in PHP 4.4, 5.1 and above, if you want to search for non-latin characters.',
'GENERAL_SEARCH_SETTINGS' => 'General search settings',
'GO_TO_SEARCH_INDEX' => 'Go to search index page',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 15a5c6dca4..09e3dddd19 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -282,6 +282,8 @@ $lang = array_merge($lang, array(
'PCRE_UTF_SUPPORT' => 'PCRE UTF-8 support',
'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will <strong>not</strong> run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.',
+ 'PCRE_UNI_PROP_SUPPORT' => 'PCRE Unicode Property support',
+ 'PCRE_UNI_PROP_SUPPORT_EXPLAIN' => 'phpBB will <strong>not</strong> run if your PHP installation is not compiled with Unicode Property support in the PCRE extension.',
'PHP_GETIMAGESIZE_SUPPORT' => 'PHP function getimagesize() is available',
'PHP_GETIMAGESIZE_SUPPORT_EXPLAIN' => '<strong>Required</strong> - In order for phpBB to function correctly, the getimagesize function needs to be available.',
'PHP_OPTIONAL_MODULE' => 'Optional modules',
@@ -295,7 +297,7 @@ $lang = array_merge($lang, array(
'PHP_SETTINGS_EXPLAIN' => '<strong>Required</strong> - You must be running at least version 4.3.3 of PHP in order to install phpBB. If <var>safe mode</var> is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.',
'PHP_URL_FOPEN_SUPPORT' => 'PHP setting <var>allow_url_fopen</var> is enabled',
'PHP_URL_FOPEN_SUPPORT_EXPLAIN' => '<strong>Optional</strong> - This setting is optional, however certain phpBB functions like off-site avatars will not work properly without it. ',
- 'PHP_VERSION_REQD' => 'PHP version >= 4.3.3',
+ 'PHP_VERSION_REQD' => 'PHP version >= 5.1.0',
'POST_ID' => 'Post ID',
'PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using <strong>%s</strong> as table prefix.',
'PREPROCESS_STEP' => 'Executing pre-processing functions/queries',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index e41728a3d0..d89993711a 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -64,7 +64,7 @@ $sort_dir = request_var('sd', 'a');
// Grab rank information for later
-$ranks = $cache->obtain_ranks();
+$ranks = cache::obtain_ranks();
// What do you want to do today? ... oops, I think that line is taken ...
diff --git a/phpBB/search.php b/phpBB/search.php
index c34aaefecf..9176356595 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -450,7 +450,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$user->add_lang('viewtopic');
// Grab icons
- $icons = $cache->obtain_icons();
+ $icons = cache::obtain_icons();
// Output header
if ($search_id && ($total_match_count > 1000))
diff --git a/phpBB/style.php b/phpBB/style.php
index 75c440bb63..37e396bb29 100644
--- a/phpBB/style.php
+++ b/phpBB/style.php
@@ -60,7 +60,7 @@ if ($id)
require($phpbb_root_path . 'includes/constants.' . $phpEx);
$db = new $sql_db();
- $cache = new cache();
+ $cache = new acm();
// Connect to DB
if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false))
@@ -69,7 +69,7 @@ if ($id)
}
unset($dbpasswd);
- $config = $cache->obtain_config();
+ $config = cache::obtain_config();
$user = false;
if ($sid)
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index 4abe2bb2a4..1e84abe7f6 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -8,10 +8,10 @@
<ul class="linklist">
<li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a></li>
<!-- IF not S_IS_BOT -->
- <!-- IF S_WATCH_FORUM_LINK --><li <!-- IF S_WATCHING_FORUM -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{S_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
- <!-- IF U_WATCH_TOPIC --><li <!-- IF S_WATCHING_TOPIC -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{U_WATCH_TOPIC}" title="{L_WATCH_TOPIC}">{L_WATCH_TOPIC}</a></li><!-- ENDIF -->
- <!-- IF U_BOOKMARK_TOPIC --><li class="icon-bookmark"><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}">{L_BOOKMARK_TOPIC}</a></li><!-- ENDIF -->
- <!-- IF U_BUMP_TOPIC --><li class="icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}">{L_BUMP_TOPIC}</a></li><!-- ENDIF -->
+ <!-- IF S_VIEWFORUM and S_WATCH_FORUM_LINK --><li <!-- IF S_WATCHING_FORUM -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{S_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
+ <!-- IF S_VIEWTOPIC and U_WATCH_TOPIC --><li <!-- IF S_WATCHING_TOPIC -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{U_WATCH_TOPIC}" title="{L_WATCH_TOPIC}">{L_WATCH_TOPIC}</a></li><!-- ENDIF -->
+ <!-- IF S_VIEWTOPIC and U_BOOKMARK_TOPIC --><li class="icon-bookmark"><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}">{L_BOOKMARK_TOPIC}</a></li><!-- ENDIF -->
+ <!-- IF S_VIEWTOPIC and U_BUMP_TOPIC --><li class="icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}">{L_BUMP_TOPIC}</a></li><!-- ENDIF -->
<!-- ENDIF -->
<li class="rightside"><a href="{U_TEAM}">{L_THE_TEAM}</a> &bull; <!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a> &bull; <!-- ENDIF -->{S_TIMEZONE}</li>
</ul>
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index 7c447afba5..48c1bcf61a 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -127,10 +127,12 @@
<li class="rightside"><a href="#" onclick="fontsizeup(); return false;" class="fontsize" title="{L_CHANGE_FONT_SIZE}">{L_CHANGE_FONT_SIZE}</a></li>
+ <!-- IF S_VIEWTOPIC -->
<!-- IF U_EMAIL_TOPIC --><li class="rightside"><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}" class="sendemail">{L_EMAIL_TOPIC}</a></li><!-- ENDIF -->
<!-- IF U_EMAIL_PM --><li class="rightside"><a href="{U_EMAIL_PM}" title="{L_EMAIL_PM}" class="sendemail">{L_EMAIL_PM}</a></li><!-- ENDIF -->
<!-- IF U_PRINT_TOPIC --><li class="rightside"><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}" accesskey="p" class="print">{L_PRINT_TOPIC}</a></li><!-- ENDIF -->
<!-- IF U_PRINT_PM --><li class="rightside"><a href="{U_PRINT_PM}" title="{L_PRINT_PM}" accesskey="p" class="print">{L_PRINT_PM}</a></li><!-- ENDIF -->
+ <!-- ENDIF -->
</ul>
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index c0ea87fede..5a618f4a2c 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -303,7 +303,7 @@ $template->assign_vars(array(
));
// Grab icons
-$icons = $cache->obtain_icons();
+$icons = cache::obtain_icons();
// Grab all topic data
$rowset = $announcement_list = $topic_list = $global_announce_list = array();
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index f24eebd1a7..cbfc58aeea 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -480,16 +480,16 @@ if ($config['allow_bookmarks'] && $user->data['is_registered'] && request_var('b
}
// Grab ranks
-$ranks = $cache->obtain_ranks();
+$ranks = cache::obtain_ranks();
// Grab icons
-$icons = $cache->obtain_icons();
+$icons = cache::obtain_icons();
// Grab extensions
$extensions = array();
if ($topic_data['topic_attachment'])
{
- $extensions = $cache->obtain_attach_extensions($forum_id);
+ $extensions = cache::obtain_attach_extensions($forum_id);
}
// Forum rules listing