1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 12:14:06 +02:00

- fixes for the following bugs:

#5326
#5318
#5304
#5290
#5288
#5278
#5276
#5272
#5266
- also fixed the "Call-time pass-by-reference" bug #5252
- within this step changed the normalize calls to require references.
- added captcha size variables to the class scope (suggestion was posted at area51)


git-svn-id: file:///svn/phpbb/trunk@6584 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-11-15 15:35:50 +00:00
parent 979e36077f
commit 548cc2c10b
38 changed files with 240 additions and 234 deletions

View File

@@ -933,30 +933,35 @@ function utf8_case_fold($text, $option = 'full')
* 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 Either an array of references to strings, a reference to an array of strings or a reference to a single string
* @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_normalize_nfc($strings)
{
if (!is_array($strings) || (sizeof($strings) > 0))
{
if (!class_exists('utf_normalizer'))
{
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
}
if (empty($strings))
{
return $strings;
}
if (is_array($strings))
if (!class_exists('utf_normalizer'))
{
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
}
if (!is_array($strings))
{
utf_normalizer::nfc($strings);
}
else if (is_array($strings))
{
foreach ($strings as $key => $string)
{
foreach ($strings as $key => $string)
{
$strings[$key] = utf_normalizer::nfc($strings[$key]);
}
}
else
{
$strings = utf_normalizer::nfc($strings);
utf_normalizer::nfc($strings[$key]);
}
}
return $strings;
}
/**
@@ -982,7 +987,7 @@ function utf8_clean_string($text)
include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
}
$text = utf_normalizer::nfc($text);
utf_normalizer::nfc($text);
static $homographs = array(
// cyrllic