Revision: 2999
https://sourceforge.net/p/mrbs/code/2999/
Author: cimorrison
Date: 2015-01-29 16:16:02 +0000 (Thu, 29 Jan 2015)
Log Message:
-----------
Created utf8_strtolower() and utf8_strtoupper() functions to ensure that
mb_strtolower() and mb_strtoupper() are called if possible in order to avoid
possible problems such as the Turkish i/I problem.
Modified Paths:
--------------
mrbs/trunk/web/File/Passwd/Authbasic.php
mrbs/trunk/web/File/Passwd/Smb.php
mrbs/trunk/web/File/Passwd/Unix.php
mrbs/trunk/web/File/Passwd.php
mrbs/trunk/web/Mail/mime.php
mrbs/trunk/web/Mail/mimePart.php
mrbs/trunk/web/Mail.php
mrbs/trunk/web/Net/SMTP.php
mrbs/trunk/web/auth/auth_config.inc
mrbs/trunk/web/auth/auth_db.inc
mrbs/trunk/web/auth/auth_db_ext.inc
mrbs/trunk/web/auth/auth_ldap.inc
mrbs/trunk/web/edit_users.php
mrbs/trunk/web/functions.inc
mrbs/trunk/web/functions_ical.inc
mrbs/trunk/web/language.inc
mrbs/trunk/web/lib/Locale.php
mrbs/trunk/web/mysql.inc
mrbs/trunk/web/mysqli.inc
mrbs/trunk/web/pgsql.inc
mrbs/trunk/web/report.php
mrbs/trunk/web/search.php
Modified: mrbs/trunk/web/File/Passwd/Authbasic.php
===================================================================
--- mrbs/trunk/web/File/Passwd/Authbasic.php 2015-01-28 17:33:32 UTC (rev
2998)
+++ mrbs/trunk/web/File/Passwd/Authbasic.php 2015-01-29 16:16:02 UTC (rev
2999)
@@ -103,7 +103,7 @@
*/
function __construct($file = '.htpasswd')
{
- if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
+ if (utf8_strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
unset($this->_modes['des']);
}
$this->setFile($file);
@@ -295,7 +295,7 @@
*/
function setMode($mode)
{
- $mode = strToLower($mode);
+ $mode = utf8_strtolower($mode);
if (!isset($this->_modes[$mode])) {
return PEAR::raiseError(
sprintf(FILE_PASSWD_E_INVALID_ENC_MODE_STR, $this->_mode),
@@ -318,7 +318,7 @@
*/
function _genPass($pass, $salt = null, $mode = null)
{
- $mode = is_null($mode) ? strToLower($this->_mode) : strToLower($mode);
+ $mode = is_null($mode) ? utf8_strtolower($this->_mode) :
utf8_strtolower($mode);
if ($mode == 'md5') {
return File_Passwd::crypt_apr_md5($pass, $salt);
@@ -375,7 +375,7 @@
*/
function generatePasswd($pass, $mode = FILE_PASSWD_DES, $salt = null)
{
- if (!in_array(strToLower($mode), array('des', 'md5', 'sha'))) {
+ if (!in_array(utf8_strtolower($mode), array('des', 'md5', 'sha'))) {
return PEAR::raiseError(
sprintf(FILE_PASSWD_E_INVALID_ENC_MODE_STR, $mode),
FILE_PASSWD_E_INVALID_ENC_MODE
Modified: mrbs/trunk/web/File/Passwd/Smb.php
===================================================================
--- mrbs/trunk/web/File/Passwd/Smb.php 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/File/Passwd/Smb.php 2015-01-29 16:16:02 UTC (rev 2999)
@@ -139,7 +139,7 @@
@list(,,$lm,$nt) = explode(':', $line);
$chap = &new Crypt_CHAP_MSv1;
- switch(strToLower($nt_or_lm)){
+ switch(utf8_strtolower($nt_or_lm)){
case FILE_PASSWD_NT:
$real = $nt;
$crypted = $chap->ntPasswordHash($pass);
@@ -154,7 +154,7 @@
FILE_PASSWD_E_INVALID_ENC_MODE
);
}
- return (strToUpper(bin2hex($crypted)) === $real);
+ return (utf8_strtoupper(bin2hex($crypted)) === $real);
}
/**
@@ -233,7 +233,7 @@
'flags' => $flags,
'userid' => (int)@$params['userid'],
'comment' => trim(@$params['comment']),
- 'lct' => 'LCT-' . strToUpper(dechex(time()))
+ 'lct' => 'LCT-' . utf8_strtoupper(dechex(time()))
);
return $this->changePasswd($user, $pass);
}
@@ -269,7 +269,7 @@
);
}
foreach ($params as $key => $value){
- $key = strToLower($key);
+ $key = utf8_strtolower($key);
if (!isset($this->_users[$user][$key])) {
return PEAR::raiseError(
sprintf(FILE_PASSWD_E_INVALID_PROPERTY_STR, $key),
@@ -277,7 +277,7 @@
);
}
$this->_users[$user][$key] = trim($value);
- $this->_users[$user]['lct']= 'LCT-' . strToUpper(dechex(time()));
+ $this->_users[$user]['lct']= 'LCT-' .
utf8_strtoupper(dechex(time()));
}
return true;
}
@@ -304,8 +304,8 @@
if (empty($pass)) {
$nthash = $lmhash = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
} else {
- $nthash = strToUpper(bin2hex($this->msc->ntPasswordHash($pass)));
- $lmhash = strToUpper(bin2hex($this->msc->lmPasswordHash($pass)));
+ $nthash =
utf8_strtoupper(bin2hex($this->msc->ntPasswordHash($pass)));
+ $lmhash =
utf8_strtoupper(bin2hex($this->msc->lmPasswordHash($pass)));
}
$this->_users[$user]['nthash'] = $nthash;
$this->_users[$user]['lmhash'] = $lmhash;
@@ -339,10 +339,10 @@
return PEAR::raiseError("User '$user' is disabled.", 0);
}
if (!empty($nthash)) {
- return $this->_users[$user]['nthash'] === strToUpper($nthash);
+ return $this->_users[$user]['nthash'] === utf8_strtoupper($nthash);
}
if (!empty($lmhash)) {
- return $this->_users[$user]['lm'] === strToUpper($lmhash);
+ return $this->_users[$user]['lm'] === utf8_strtoupper($lmhash);
}
return false;
}
@@ -408,10 +408,10 @@
function generatePasswd($pass, $mode = 'nt')
{
$chap = &new Crypt_CHAP_MSv1;
- $hash = strToLower($mode) == 'nt' ?
+ $hash = utf8_strtolower($mode) == 'nt' ?
$chap->ntPasswordHash($pass) :
$chap->lmPasswordHash($pass);
- return strToUpper(bin2hex($hash));
+ return utf8_strtoupper(bin2hex($hash));
}
/**
Modified: mrbs/trunk/web/File/Passwd/Unix.php
===================================================================
--- mrbs/trunk/web/File/Passwd/Unix.php 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/File/Passwd/Unix.php 2015-01-29 16:16:02 UTC (rev 2999)
@@ -242,7 +242,7 @@
*/
function setMode($mode)
{
- $mode = strToLower($mode);
+ $mode = utf8_strtolower($mode);
if (!isset($this->_modes[$mode])) {
return PEAR::raiseError(
sprintf(FILE_PASSWD_E_INVALID_ENC_MODE_STR, $mode),
@@ -609,7 +609,7 @@
$crypters = get_class_methods('File_Passwd');
}
- $mode = !isset($mode) ? strToLower($this->_mode) : strToLower($mode);
+ $mode = !isset($mode) ? utf8_strtolower($this->_mode) :
utf8_strtolower($mode);
$func = 'crypt_' . $mode;
if (!in_array($func, $crypters)) {
Modified: mrbs/trunk/web/File/Passwd.php
===================================================================
--- mrbs/trunk/web/File/Passwd.php 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/File/Passwd.php 2015-01-29 16:16:02 UTC (rev 2999)
@@ -348,7 +348,7 @@
*/
function &factory($class)
{
- $class = ucFirst(strToLower($class));
+ $class = ucFirst(utf8_strtolower($class));
if (!@include_once "File/Passwd/$class.php") {
return PEAR::raiseError("Couldn't load file Passwd/$class.php", 0);
}
@@ -405,7 +405,7 @@
*/
function staticAuth($type, $file, $user, $pass, $opt = '')
{
- $type = ucFirst(strToLower($type));
+ $type = ucFirst(utf8_strtolower($type));
if (!@include_once "File/Passwd/$type.php") {
return PEAR::raiseError("Couldn't load file Passwd/$type.php", 0);
}
Modified: mrbs/trunk/web/Mail/mime.php
===================================================================
--- mrbs/trunk/web/Mail/mime.php 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/Mail/mime.php 2015-01-29 16:16:02 UTC (rev 2999)
@@ -1433,9 +1433,9 @@
$encodings = array('7bit', '8bit', 'base64', 'quoted-printable');
$this->_build_params['text_encoding']
- = strtolower($this->_build_params['text_encoding']);
+ = utf8_strtolower($this->_build_params['text_encoding']);
$this->_build_params['html_encoding']
- = strtolower($this->_build_params['html_encoding']);
+ = utf8_strtolower($this->_build_params['html_encoding']);
if (!in_array($this->_build_params['text_encoding'], $encodings)) {
$this->_build_params['text_encoding'] = '7bit';
Modified: mrbs/trunk/web/Mail/mimePart.php
===================================================================
--- mrbs/trunk/web/Mail/mimePart.php 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/Mail/mimePart.php 2015-01-29 16:16:02 UTC (rev 2999)
@@ -822,7 +822,7 @@
'references', 'in-reply-to', 'message-id', 'resent-message-id',
);
- $name = strtolower($name);
+ $name = utf8_strtolower($name);
if (in_array($name, $comma_headers)) {
$separator = ',';
Modified: mrbs/trunk/web/Mail.php
===================================================================
--- mrbs/trunk/web/Mail.php 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/Mail.php 2015-01-29 16:16:02 UTC (rev 2999)
@@ -73,7 +73,7 @@
*/
function &factory($driver, $params = array())
{
- $driver = strtolower($driver);
+ $driver = utf8_strtolower($driver);
@include_once 'Mail/' . $driver . '.php';
$class = 'Mail_' . $driver;
if (class_exists($class)) {
Modified: mrbs/trunk/web/Net/SMTP.php
===================================================================
--- mrbs/trunk/web/Net/SMTP.php 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/Net/SMTP.php 2015-01-29 16:16:02 UTC (rev 2999)
@@ -552,7 +552,7 @@
return $method;
}
} else {
- $method = strtoupper($method);
+ $method = utf8_strtoupper($method);
if (!in_array($method, $this->auth_methods)) {
return PEAR::raiseError("$method is not a supported
authentication method");
}
Modified: mrbs/trunk/web/auth/auth_config.inc
===================================================================
--- mrbs/trunk/web/auth/auth_config.inc 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/auth/auth_config.inc 2015-01-29 16:16:02 UTC (rev 2999)
@@ -43,8 +43,8 @@
if ((isset($auth["user"][$user]) &&
($auth["user"][$user] == $pass)
) ||
- (isset($auth["user"][strtolower($user)]) &&
- ($auth["user"][strtolower($user)] == $pass)
+ (isset($auth["user"][utf8_strtolower($user)]) &&
+ ($auth["user"][utf8_strtolower($user)] == $pass)
))
{
return 1; // User validated
Modified: mrbs/trunk/web/auth/auth_db.inc
===================================================================
--- mrbs/trunk/web/auth/auth_db.inc 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/auth/auth_db.inc 2015-01-29 16:16:02 UTC (rev 2999)
@@ -46,7 +46,7 @@
// messy. WE could use STRCMP, but that's MySQL only.
$sql = "SELECT COUNT(*)
FROM $tbl_users
- WHERE " . sql_syntax_casesensitive_equals('name',
strtolower($user)) . "
+ WHERE " . sql_syntax_casesensitive_equals('name',
utf8_strtolower($user)) . "
AND password='$pass'
LIMIT 1";
@@ -78,7 +78,7 @@
return 0;
}
- $result = sql_query1("SELECT level FROM $tbl_users WHERE name='" .
strtolower(sql_escape($user)) . "' LIMIT 1");
+ $result = sql_query1("SELECT level FROM $tbl_users WHERE name='" .
sql_escape(utf8_strtolower($user)) . "' LIMIT 1");
if ($result == -1)
{
$sql_error = sql_error();
Modified: mrbs/trunk/web/auth/auth_db_ext.inc
===================================================================
--- mrbs/trunk/web/auth/auth_db_ext.inc 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/auth/auth_db_ext.inc 2015-01-29 16:16:02 UTC (rev 2999)
@@ -57,7 +57,7 @@
// MySQL allows trailing spaces when using an '=' comparison, eg 'john' =
'john '
$query = "SELECT " . sql_quote($auth['db_ext']['column_name_password']) .
" FROM " . sql_quote($auth['db_ext']['db_table']) .
- " WHERE " .
sql_syntax_casesensitive_equals($auth['db_ext']['column_name_username'],
strtolower($user));
+ " WHERE " .
sql_syntax_casesensitive_equals($auth['db_ext']['column_name_username'],
utf8_strtolower($user));
$r = sql_query($query, $conn);
@@ -184,7 +184,7 @@
// MySQL allows trailing spaces when using an '=' comparison, eg 'john' =
'john '
$query = "SELECT " . sql_quote($auth['db_ext']['column_name_email']) . "
FROM " . sql_quote($auth['db_ext']['db_table']) . "
- WHERE " .
sql_syntax_casesensitive_equals($auth['db_ext']['column_name_username'],
strtolower($user)) . "
+ WHERE " .
sql_syntax_casesensitive_equals($auth['db_ext']['column_name_username'],
utf8_strtolower($user)) . "
LIMIT 1";
$r = sql_query($query, $conn);
Modified: mrbs/trunk/web/auth/auth_ldap.inc
===================================================================
--- mrbs/trunk/web/auth/auth_ldap.inc 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/auth/auth_ldap.inc 2015-01-29 16:16:02 UTC (rev 2999)
@@ -303,13 +303,13 @@
$ldap,
$dn,
"(objectclass=*)",
- array(strtolower($email_attrib))
+ array(utf8_strtolower($email_attrib))
);
if (@ldap_count_entries($ldap, $res) > 0)
{
authLdapDebug("authLdapGetEmailCallback: search successful");
$entries = ldap_get_entries($ldap, $res);
- $object['email'] = $entries[0][strtolower($email_attrib)][0];
+ $object['email'] = $entries[0][utf8_strtolower($email_attrib)][0];
authLdapDebug("authLdapGetEmailCallback: email is '".
$object['email']."'");
@@ -452,14 +452,14 @@
$ldap,
$dn,
"(objectclass=*)",
- array(strtolower($group_member_attrib))
+ array(utf8_strtolower($group_member_attrib))
);
if (@ldap_count_entries($ldap, $res) > 0)
{
authLdapDebug("authCheckAdminGroupCallback: search successful".
" $group_member_attrib");
$entries = ldap_get_entries($ldap, $res);
- foreach ($entries[0][strtolower($group_member_attrib)] as $group)
+ foreach ($entries[0][utf8_strtolower($group_member_attrib)] as $group)
{
if (strcasecmp($group, $admin_group_dn) == 0)
{
Modified: mrbs/trunk/web/edit_users.php
===================================================================
--- mrbs/trunk/web/edit_users.php 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/edit_users.php 2015-01-29 16:16:02 UTC (rev 2999)
@@ -563,7 +563,7 @@
case 'name':
// name: convert it to lower case
$q_string .= "&$fieldname=" . urlencode($values[$fieldname]);
- $values[$fieldname] = strtolower($values[$fieldname]);
+ $values[$fieldname] = utf8_strtolower($values[$fieldname]);
break;
case 'password':
// password: if the password field is blank it means
Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/functions.inc 2015-01-29 16:16:02 UTC (rev 2999)
@@ -1344,7 +1344,7 @@
// well, so we have to turn it on. (We'll also turn it on for Opera in the
JavaScript,
// for good measure, just in case the server isn't passing through the user
agent).
$html .= " autocomplete=\"";
- $html .= (strpos(strtolower($HTTP_USER_AGENT), 'opera') === FALSE) ? 'off' :
'on';
+ $html .= (strpos(utf8_strtolower($HTTP_USER_AGENT), 'opera') === FALSE) ?
'off' : 'on';
$html .= "\">\n";
$html .= "<datalist id=\"" . $params['id'] . "_options\">";
Modified: mrbs/trunk/web/functions_ical.inc
===================================================================
--- mrbs/trunk/web/functions_ical.inc 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/functions_ical.inc 2015-01-29 16:16:02 UTC (rev 2999)
@@ -274,7 +274,7 @@
if (isset($this_timezone))
{
- if (strtoupper($this_timezone) == 'UTC')
+ if (utf8_strtoupper($this_timezone) == 'UTC')
{
$result = gmmktime($hour, $minute, $second, $month, $day, $year);
}
Modified: mrbs/trunk/web/language.inc
===================================================================
--- mrbs/trunk/web/language.inc 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/language.inc 2015-01-29 16:16:02 UTC (rev 2999)
@@ -521,6 +521,14 @@
// A list of languages that use Right to Left text
$rtl_languages = array('he');
+
+// Set up mb_string internal encoding
+if (function_exists('mb_internal_encoding'))
+{
+ mb_internal_encoding('UTF-8');
+}
+
+
////////////////////////////////////////////////////////////////////////
// Language token handling
@@ -587,7 +595,7 @@
$locale = $lang;
// Work out if we're using a RTL language. This variable is used
// globally so that we can include the correct stylesheet
- $using_rtl = in_array(strtolower($lang), $rtl_languages);
+ $using_rtl = in_array(utf8_strtolower($lang), $rtl_languages);
$doneit = 1;
break;
}
@@ -673,9 +681,9 @@
if ($server_os == "windows")
{
- if (array_key_exists(strtolower($lang), $lang_map_windows))
+ if (array_key_exists(utf8_strtolower($lang), $lang_map_windows))
{
- $locale = $lang_map_windows[strtolower($lang)];
+ $locale = $lang_map_windows[utf8_strtolower($lang)];
}
else
{
@@ -695,15 +703,15 @@
else
{
// Convert locale=xx to xx_XX
- $locale = strtolower($lang)."_".strtoupper($lang);
+ $locale = utf8_strtolower($lang) . "_" . utf8_strtoupper($lang);
}
}
else
{
// First, if we have a map, use it
- if (isset($lang_map_unix[strtolower($lang)]))
+ if (isset($lang_map_unix[utf8_strtolower($lang)]))
{
- $locale = $lang_map_unix[strtolower($lang)];
+ $locale = $lang_map_unix[utf8_strtolower($lang)];
}
else
{
@@ -798,9 +806,9 @@
$result = array();
foreach ($qualifiers as $lang => $qualifier)
{
- if (isset($lang_aliases[strtolower($lang)]))
+ if (isset($lang_aliases[utf8_strtolower($lang)]))
{
- $result[$lang_aliases[strtolower($lang)]] = $qualifier;
+ $result[$lang_aliases[utf8_strtolower($lang)]] = $qualifier;
}
else
{
@@ -983,7 +991,7 @@
global $PHP_SELF;
global $vocab, $mrbs_admin, $mrbs_company; // Used in lang files
- $lang = strtolower($lang);
+ $lang = utf8_strtolower($lang);
if (file_exists('lang'))
{
@@ -1047,7 +1055,7 @@
function get_bom($charset)
{
- switch(strtolower($charset))
+ switch(utf8_strtolower($charset))
{
case 'utf-8':
return "\xEF\xBB\xBF";
@@ -1109,7 +1117,7 @@
}
// Convert character encoding name to lowercase
- $character_encoding = strtolower($character_encoding);
+ $character_encoding = utf8_strtolower($character_encoding);
// Check that we know of an IBM AIX libiconv character encoding name
equivalent for this character encoding name
if (!array_key_exists($character_encoding,
$gnu_iconv_to_aix_iconv_codepage_map))
@@ -1594,6 +1602,34 @@
}
+// Wrapper round mb_strtolower() to make sure it's used if present and mb_sting
+// function overloading is not enabled.
+// The ordinary strtolower() will give unexpected results when the locale is
set to
+// Turkish and will not convert the letter 'I'.
+function utf8_strtolower($str)
+{
+ if (function_exists('mb_strtolower'))
+ {
+ return mb_strtolower($str);
+ }
+ return strtolower($str);
+}
+
+
+// Wrapper round mb_strtoupper() to make sure it's used if present and mb_sting
+// function overloading is not enabled.
+// The ordinary strtoupper() will give unexpected results when the locale is
set to
+// Turkish and will not convert the letter 'i'.
+function utf8_strtoupper($str)
+{
+ if (function_exists('mb_strtoupper'))
+ {
+ return mb_strtoupper($str);
+ }
+ return strtoupper($str);
+}
+
+
// Format a locale which could be xx-xX or xx_Xx or xx_XxXx (etc.) into a
// standardised format consiting of a lower case language followed, if
applicable,
// by an upper case country, separated by $separator. Typically the
separator
@@ -1602,11 +1638,11 @@
{
if (strlen($locale) == 2)
{
- $locale = strtolower($locale);
+ $locale = utf8_strtolower($locale);
}
else
{
- $locale = strtolower(substr($locale,0,2)) . $separator .
strtoupper(substr($locale,3));
+ $locale = utf8_strtolower(substr($locale,0,2)) . $separator .
utf8_strtoupper(substr($locale,3));
}
return $locale;
}
Modified: mrbs/trunk/web/lib/Locale.php
===================================================================
--- mrbs/trunk/web/lib/Locale.php 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/lib/Locale.php 2015-01-29 16:16:02 UTC (rev 2999)
@@ -51,7 +51,7 @@
{
$glue = ',';
$result = (is_array($langtag)) ? implode($glue, $langtag) : $langtag;
- $result = strtolower(str_replace('_', '-', $result));
+ $result = utf8_strtolower(str_replace('_', '-', $result));
return (is_array($langtag)) ? explode($glue, $result) : $result;
}
}
\ No newline at end of file
Modified: mrbs/trunk/web/mysql.inc
===================================================================
--- mrbs/trunk/web/mysql.inc 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/mysql.inc 2015-01-29 16:16:02 UTC (rev 2999)
@@ -493,7 +493,7 @@
$length = NULL;
}
// Convert the is_nullable field to a boolean
- $is_nullable = (strtolower($row['Null']) == 'yes') ? TRUE : FALSE;
+ $is_nullable = (utf8_strtolower($row['Null']) == 'yes') ? TRUE : FALSE;
$fields[$i]['name'] = $name;
$fields[$i]['type'] = $type;
Modified: mrbs/trunk/web/mysqli.inc
===================================================================
--- mrbs/trunk/web/mysqli.inc 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/mysqli.inc 2015-01-29 16:16:02 UTC (rev 2999)
@@ -527,7 +527,7 @@
$length = NULL;
}
// Convert the is_nullable field to a boolean
- $is_nullable = (strtolower($row['Null']) == 'yes') ? TRUE : FALSE;
+ $is_nullable = (utf8_strtolower($row['Null']) == 'yes') ? TRUE : FALSE;
$fields[$i]['name'] = $name;
$fields[$i]['type'] = $type;
Modified: mrbs/trunk/web/pgsql.inc
===================================================================
--- mrbs/trunk/web/pgsql.inc 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/pgsql.inc 2015-01-29 16:16:02 UTC (rev 2999)
@@ -544,7 +544,7 @@
$length = $row['character_octet_length'];
}
// Convert the is_nullable field to a boolean
- $is_nullable = (strtolower($row['is_nullable']) == 'yes') ? TRUE : FALSE;
+ $is_nullable = (utf8_strtolower($row['is_nullable']) == 'yes') ? TRUE :
FALSE;
$fields[$i]['name'] = $name;
$fields[$i]['type'] = $type;
Modified: mrbs/trunk/web/report.php
===================================================================
--- mrbs/trunk/web/report.php 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/report.php 2015-01-29 16:16:02 UTC (rev 2999)
@@ -331,8 +331,8 @@
// to be used for CSV files
function csv_conv($string)
{
- $in_charset = strtoupper(get_charset());
- $out_charset = strtoupper(get_csv_charset());
+ $in_charset = utf8_strtoupper(get_charset());
+ $out_charset = utf8_strtoupper(get_csv_charset());
// Use iconv() if it exists because it's faster than our own code and also
it's
// standard (though it has the disadvantage that it adds in BOMs which we
have to remove)
@@ -1343,7 +1343,7 @@
// We have to use strpos() rather than stripos() because we cannot
// assume PHP5
if (($option_key !== '') &&
- (strpos(strtolower($option_value), strtolower($$var)) !== FALSE))
+ (strpos(utf8_strtolower($option_value), utf8_strtolower($$var))
!== FALSE))
{
$or_array[] = "E.$key='" . sql_escape($option_key) . "'";
}
Modified: mrbs/trunk/web/search.php
===================================================================
--- mrbs/trunk/web/search.php 2015-01-28 17:33:32 UTC (rev 2998)
+++ mrbs/trunk/web/search.php 2015-01-29 16:16:02 UTC (rev 2999)
@@ -214,7 +214,7 @@
{
// We have to use strpos() rather than stripos() because we cannot
// assume PHP5
- if (($key !== '') && (strpos(strtolower($value),
strtolower($search_str)) !== FALSE))
+ if (($key !== '') && (strpos(utf8_strtolower($value),
utf8_strtolower($search_str)) !== FALSE))
{
$sql_pred .= " OR E." . $field['name'] . "='" . sql_escape($key) .
"'";
}
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits