- Patch #9330: ucfirst() gives problem when used with multibyte charset.
Replaced the use of ucfirst() with a CSS-based solution.4.5.x
parent
f037130086
commit
9bbdb71ee4
|
|
@ -19,7 +19,7 @@ function drupal_set_title($title = NULL) {
|
||||||
static $stored_title;
|
static $stored_title;
|
||||||
|
|
||||||
if (isset($title)) {
|
if (isset($title)) {
|
||||||
$stored_title = ucfirst($title);
|
$stored_title = $title;
|
||||||
}
|
}
|
||||||
return $stored_title;
|
return $stored_title;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -404,7 +404,7 @@ function menu_get_active_title() {
|
||||||
$menu = menu_get_menu();
|
$menu = menu_get_menu();
|
||||||
|
|
||||||
if ($mid = menu_get_active_nontask_item()) {
|
if ($mid = menu_get_active_nontask_item()) {
|
||||||
return ucfirst($menu['items'][$mid]['title']);
|
return $menu['items'][$mid]['title'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -204,12 +204,12 @@ function theme_status_messages() {
|
||||||
if (count($messages) > 1) {
|
if (count($messages) > 1) {
|
||||||
$output .= " <ul>\n";
|
$output .= " <ul>\n";
|
||||||
foreach($messages as $message) {
|
foreach($messages as $message) {
|
||||||
$output .= ' <li>'. ucfirst($message) ."</li>\n";
|
$output .= ' <li>'. $message ."</li>\n";
|
||||||
}
|
}
|
||||||
$output .= " </ul>\n";
|
$output .= " </ul>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$output .= ucfirst($messages[0]);
|
$output .= $messages[0];
|
||||||
}
|
}
|
||||||
$output .= "</div>\n";
|
$output .= "</div>\n";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,14 @@ li a.active {
|
||||||
td.menu-disabled {
|
td.menu-disabled {
|
||||||
background: #ccc;
|
background: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** CSS capitalization
|
||||||
|
*/
|
||||||
|
.title:first-letter,
|
||||||
|
.messages:first-letter,
|
||||||
|
.messages li:first-letter { text-transform: uppercase; }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Other common styles
|
** Other common styles
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ function tracker_page($uid = 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows[] = array(
|
$rows[] = array(
|
||||||
ucfirst(node_invoke($node->type, 'node_name')),
|
node_invoke($node->type, 'node_name'),
|
||||||
l($node->title, "node/$node->nid") .' '. (node_is_new($node->nid, $node->changed) ? theme('mark') : ''),
|
l($node->title, "node/$node->nid") .' '. (node_is_new($node->nid, $node->changed) ? theme('mark') : ''),
|
||||||
format_name($node),
|
format_name($node),
|
||||||
array('class' => 'replies', 'data' => $comments),
|
array('class' => 'replies', 'data' => $comments),
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ function tracker_page($uid = 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows[] = array(
|
$rows[] = array(
|
||||||
ucfirst(node_invoke($node->type, 'node_name')),
|
node_invoke($node->type, 'node_name'),
|
||||||
l($node->title, "node/$node->nid") .' '. (node_is_new($node->nid, $node->changed) ? theme('mark') : ''),
|
l($node->title, "node/$node->nid") .' '. (node_is_new($node->nid, $node->changed) ? theme('mark') : ''),
|
||||||
format_name($node),
|
format_name($node),
|
||||||
array('class' => 'replies', 'data' => $comments),
|
array('class' => 'replies', 'data' => $comments),
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ function user_validate_authmap($account, $authname, $module) {
|
||||||
$result = db_query("SELECT COUNT(*) from {authmap} WHERE uid != %d AND authname = '%s'", $account->uid, $authname);
|
$result = db_query("SELECT COUNT(*) from {authmap} WHERE uid != %d AND authname = '%s'", $account->uid, $authname);
|
||||||
if (db_result($result) > 0) {
|
if (db_result($result) > 0) {
|
||||||
$name = module_invoke($module, 'info', 'name');
|
$name = module_invoke($module, 'info', 'name');
|
||||||
return t('The %u ID %s is already taken.', array('%u' => ucfirst($name), '%s' => "<i>$authname</i>"));
|
return t('The %u ID %s is already taken.', array('%u' => $name, '%s' => "<i>$authname</i>"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ function user_validate_authmap($account, $authname, $module) {
|
||||||
$result = db_query("SELECT COUNT(*) from {authmap} WHERE uid != %d AND authname = '%s'", $account->uid, $authname);
|
$result = db_query("SELECT COUNT(*) from {authmap} WHERE uid != %d AND authname = '%s'", $account->uid, $authname);
|
||||||
if (db_result($result) > 0) {
|
if (db_result($result) > 0) {
|
||||||
$name = module_invoke($module, 'info', 'name');
|
$name = module_invoke($module, 'info', 'name');
|
||||||
return t('The %u ID %s is already taken.', array('%u' => ucfirst($name), '%s' => "<i>$authname</i>"));
|
return t('The %u ID %s is already taken.', array('%u' => $name, '%s' => "<i>$authname</i>"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue