summaryrefslogtreecommitdiff
path: root/includes/unicode.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-12-01 16:47:58 +0000
committerDries Buytaert <dries@buytaert.net>2006-12-01 16:47:58 +0000
commit9460c93033ed5b394cbf95f766d6f120559544fc (patch)
tree4a09765c8205a02b6351c3bfd034f27774c8d29a /includes/unicode.inc
parentb31bc48d85e7a4829a17d0cbd6ef5347ec939c66 (diff)
downloadbrdo-9460c93033ed5b394cbf95f766d6f120559544fc.tar.gz
brdo-9460c93033ed5b394cbf95f766d6f120559544fc.tar.bz2
- Correcting patch #85689: the wrong patch got committed.
Diffstat (limited to 'includes/unicode.inc')
-rw-r--r--includes/unicode.inc24
1 files changed, 15 insertions, 9 deletions
diff --git a/includes/unicode.inc b/includes/unicode.inc
index 57a4f4f42..4c8621c04 100644
--- a/includes/unicode.inc
+++ b/includes/unicode.inc
@@ -33,32 +33,32 @@ function _unicode_check() {
// Check for outdated PCRE library
// Note: we check if U+E2 is in the range U+E0 - U+E1. This test returns TRUE on old PCRE versions.
if (preg_match('/[à-á]/u', 'â')) {
- return array(UNICODE_ERROR, $t('The PCRE library in your PHP installation is outdated. This will cause problems when handling Unicode text. If you are running PHP 4.3.3 or higher, make sure you are using the PCRE library supplied by PHP. Please refer to the <a href="@url">PHP PCRE documentation</a> for more information.', array('@url' => 'http://www.php.net/pcre')), REQUIREMENT_ERROR);
+ return array(UNICODE_ERROR, $t('The PCRE library in your PHP installation is outdated. This will cause problems when handling Unicode text. If you are running PHP 4.3.3 or higher, make sure you are using the PCRE library supplied by PHP. Please refer to the <a href="@url">PHP PCRE documentation</a> for more information.', array('@url' => 'http://www.php.net/pcre')));
}
// Check for mbstring extension
if (!function_exists('mb_strlen')) {
- return array(UNICODE_SINGLEBYTE, $t('Operations on Unicode strings are emulated on a best-effort basis. Install the <a href="@url">PHP mbstring extension</a> for improved Unicode support.', array('@url' => 'http://www.php.net/mbstring')), REQUIREMENT_WARNING);
+ return array(UNICODE_SINGLEBYTE, $t('Operations on Unicode strings are emulated on a best-effort basis. Install the <a href="@url">PHP mbstring extension</a> for improved Unicode support.', array('@url' => 'http://www.php.net/mbstring')));
}
// Check mbstring configuration
if (ini_get('mbstring.func_overload') != 0) {
- return array(UNICODE_ERROR, $t('Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini <em>mbstring.func_overload</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', array('@url' => 'http://www.php.net/mbstring')), REQUIREMENT_ERROR);
+ return array(UNICODE_ERROR, $t('Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini <em>mbstring.func_overload</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', array('@url' => 'http://www.php.net/mbstring')));
}
if (ini_get('mbstring.encoding_translation') != 0) {
- return array(UNICODE_ERROR, $t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.encoding_translation</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', array('@url' => 'http://www.php.net/mbstring')), REQUIREMENT_ERROR);
+ return array(UNICODE_ERROR, $t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.encoding_translation</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', array('@url' => 'http://www.php.net/mbstring')));
}
if (ini_get('mbstring.http_input') != 'pass') {
- return array(UNICODE_ERROR, $t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_input</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', array('@url' => 'http://www.php.net/mbstring')), REQUIREMENT_ERROR);
+ return array(UNICODE_ERROR, $t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_input</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', array('@url' => 'http://www.php.net/mbstring')));
}
if (ini_get('mbstring.http_output') != 'pass') {
- return array(UNICODE_ERROR, $t('Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_output</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', array('@url' => 'http://www.php.net/mbstring')), REQUIREMENT_ERROR);
+ return array(UNICODE_ERROR, $t('Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_output</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', array('@url' => 'http://www.php.net/mbstring')));
}
// Set appropriate configuration
mb_internal_encoding('utf-8');
mb_language('uni');
- return array(UNICODE_MULTIBYTE, '', REQUIREMENT_OK);
+ return array(UNICODE_MULTIBYTE, '');
}
/**
@@ -73,7 +73,12 @@ function unicode_requirements() {
UNICODE_MULTIBYTE => $t('PHP Mbstring Extension'),
UNICODE_ERROR => $t('Error'),
);
- list($library, $description, $severity) = _unicode_check();
+ $severities = array(
+ UNICODE_SINGLEBYTE => REQUIREMENT_WARNING,
+ UNICODE_MULTIBYTE => REQUIREMENT_OK,
+ UNICODE_ERROR => REQUIREMENT_ERROR,
+ );
+ list($library, $description) = _unicode_check();
$requirements['unicode'] = array(
'title' => $t('Unicode library'),
@@ -81,9 +86,10 @@ function unicode_requirements() {
);
if ($description) {
$requirements['unicode']['description'] = $description;
- $requirements['unicode']['severity'] = $severity;
}
+ $requirements['unicode']['severity'] = $severities[$library];
+
return $requirements;
}