mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
- Do not split topic list for topics being promoted to announcements after been moved to another forum (Bug #18635)
- Allow editing usernames within database_update on username cleanup (Bug #18415) - Fixing wrong sync() calls if moving all posts by a member in ACP (Bug #18385) - Check entered imagemagick path for trailing slash (Bug #18205) - Use proper title on index for new/unread posts (Bug #13101) - patch provided by Pyramide - Allow calls to $user->set_cookie() define no cookie time for setting session cookies (Bug #18025) git-svn-id: file:///svn/phpbb/trunk@8310 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1787,40 +1787,4 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data)
|
||||
}
|
||||
}
|
||||
|
||||
function utf8_new_clean_string($text)
|
||||
{
|
||||
static $homographs = array();
|
||||
static $utf8_case_fold_nfkc = '';
|
||||
if (empty($homographs))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
if (!function_exists('utf8_case_fold_nfkc') || !file_exists($phpbb_root_path . 'includes/utf/data/confusables.' . $phpEx))
|
||||
{
|
||||
if (!file_exists($phpbb_root_path . 'install/data/confusables.' . $phpEx))
|
||||
{
|
||||
global $lang;
|
||||
trigger_error(sprintf($lang['UPDATE_REQUIRES_FILE'], $phpbb_root_path . 'install/data/confusables.' . $phpEx), E_USER_ERROR);
|
||||
}
|
||||
$homographs = include($phpbb_root_path . 'install/data/confusables.' . $phpEx);
|
||||
$utf8_case_fold_nfkc = 'utf8_new_case_fold_nfkc';
|
||||
}
|
||||
else
|
||||
{
|
||||
$homographs = include($phpbb_root_path . 'includes/utf/data/confusables.' . $phpEx);
|
||||
$utf8_case_fold_nfkc = 'utf8_case_fold_nfkc';
|
||||
}
|
||||
}
|
||||
|
||||
$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('# {2,}#', ' ', $text);
|
||||
|
||||
// we can use trim here as all the other space characters should have been turned
|
||||
// into normal ASCII spaces by now
|
||||
return trim($text);
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user