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:
99b0042
)
Made wfBaseconvert actually work with $lowercase=false.
author
Aaron Schulz
<aschulz@wikimedia.org>
Tue, 25 Dec 2012 08:26:26 +0000
(
00:26
-0800)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Tue, 25 Dec 2012 09:36:45 +0000
(09:36 +0000)
* This used to return false for any non-digit input characters.
Change-Id: Ie7fca2669724dea29f4733bbc77a559d4f48a5b1
includes/GlobalFunctions.php
patch
|
blob
|
history
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
9779cb8
..
208befe
100644
(file)
--- a/
includes/GlobalFunctions.php
+++ b/
includes/GlobalFunctions.php
@@
-3200,7
+3200,7
@@
function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, $lowercase = t
$input == '' ) {
return false;
}
- $digitChars =
( $lowercase ) ? '0123456789abcdefghijklmnopqrstuvwxyz' : '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
';
+ $digitChars =
'0123456789abcdefghijklmnopqrstuvwxyz
';
$inDigits = array();
$outChars = '';
@@
-3256,6
+3256,10
@@
function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, $lowercase = t
$outChars .= '0';
}
+ if ( !$lowercase ) {
+ $outChars = strtoupper( $outChars );
+ }
+
return strrev( $outChars );
}