Issue #2361809 by rpayanm, nlisgo: Remove usage of drupal_strtoupper().

8.0.x
Alex Pott 2014-11-03 10:40:47 +00:00
parent ea325a904e
commit f98cf1f60c
5 changed files with 9 additions and 8 deletions

View File

@ -199,7 +199,7 @@ class Schema extends DatabaseSchema {
// Set the correct database-engine specific datatype.
// In case one is already provided, force it to uppercase.
if (isset($field['mysql_type'])) {
$field['mysql_type'] = drupal_strtoupper($field['mysql_type']);
$field['mysql_type'] = Unicode::strtoupper($field['mysql_type']);
}
else {
$map = $this->getFieldTypeMap();

View File

@ -125,7 +125,7 @@ class Schema extends DatabaseSchema {
// Set the correct database-engine specific datatype.
// In case one is already provided, force it to uppercase.
if (isset($field['sqlite_type'])) {
$field['sqlite_type'] = drupal_strtoupper($field['sqlite_type']);
$field['sqlite_type'] = Unicode::strtoupper($field['sqlite_type']);
}
else {
$map = $this->getFieldTypeMap();

View File

@ -311,7 +311,7 @@ class Condition implements ConditionInterface, \Countable {
}
else {
// We need to upper case because PHP index matches are case sensitive but
// do not need the more expensive drupal_strtoupper because SQL statements are ASCII.
// do not need the more expensive Unicode::strtoupper() because SQL statements are ASCII.
$operator = strtoupper($operator);
$return = isset($specials[$operator]) ? $specials[$operator] : array();
}

View File

@ -226,12 +226,12 @@ class MailFormatHelper {
// Fancy headers.
case 'h1':
$indent[] = '======== ';
$casing = 'drupal_strtoupper';
$casing = '\Drupal\Component\Utility\Unicode::strtoupper';
break;
case 'h2':
$indent[] = '-------- ';
$casing = 'drupal_strtoupper';
$casing = '\Drupal\Component\Utility\Unicode::strtoupper';
break;
case '/h1':
@ -273,7 +273,7 @@ class MailFormatHelper {
if (isset($chunk)) {
// Apply any necessary case conversion.
if (isset($casing)) {
$chunk = $casing($chunk);
$chunk = call_user_func($casing, $chunk);
}
$line_endings = Settings::get('mail_line_endings', PHP_EOL);
// Format it and apply the current indentation.

View File

@ -8,6 +8,7 @@
namespace Drupal\system\Tests\Mail;
use Drupal\Component\Utility\String;
use Drupal\Component\Utility\Unicode;
use Drupal\Core\Site\Settings;
use Drupal\simpletest\WebTestBase;
@ -242,8 +243,8 @@ class HtmlToTextTest extends WebTestBase {
if (!$pass) {
$this->verbose($this->stringToHtml($output));
}
$output_upper = drupal_strtoupper($output);
$upper_input = drupal_strtoupper($input);
$output_upper = Unicode::strtoupper($output);
$upper_input = Unicode::strtoupper($input);
$upper_output = drupal_html_to_text($upper_input);
$pass = $this->assertEqual(
$upper_output,