dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ab9595e
)
Adding helpful comments
author
Ryan Kaldari
<kaldari@users.mediawiki.org>
Thu, 2 Sep 2010 18:05:58 +0000
(18:05 +0000)
committer
Ryan Kaldari
<kaldari@users.mediawiki.org>
Thu, 2 Sep 2010 18:05:58 +0000
(18:05 +0000)
languages/Language.php
patch
|
blob
|
history
diff --git
a/languages/Language.php
b/languages/Language.php
index
74cdb75
..
e1f6b00
100644
(file)
--- a/
languages/Language.php
+++ b/
languages/Language.php
@@
-1600,18
+1600,24
@@
class Language {
return strtr( $matches[0], $wikiUpperChars );
}
return strtr( $matches[0], $wikiUpperChars );
}
+ /**
+ * Make a string's first character uppercase
+ */
function ucfirst( $str ) {
$o = ord( $str );
function ucfirst( $str ) {
$o = ord( $str );
- if ( $o < 96 ) {
+ if ( $o < 96 ) {
// if already uppercase...
return $str;
} elseif ( $o < 128 ) {
return $str;
} elseif ( $o < 128 ) {
- return ucfirst( $str );
+ return ucfirst( $str );
// use PHP's ucfirst()
} else {
// fall back to more complex logic in case of multibyte strings
} else {
// fall back to more complex logic in case of multibyte strings
- return
$this->
uc( $str, true );
+ return
self::
uc( $str, true );
}
}
}
}
+ /**
+ * Convert a string to uppercase
+ */
function uc( $str, $first = false ) {
if ( function_exists( 'mb_strtoupper' ) ) {
if ( $first ) {
function uc( $str, $first = false ) {
if ( function_exists( 'mb_strtoupper' ) ) {
if ( $first ) {