dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
EditPage: Deprecate public isCssJsSubpage related member variables
[lhc/web/wiklou.git]
/
includes
/
GlobalFunctions.php
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
fa97515
..
484dfe8
100644
(file)
--- a/
includes/GlobalFunctions.php
+++ b/
includes/GlobalFunctions.php
@@
-195,11
+195,15
@@
function wfArrayDiff2_cmp( $a, $b ) {
} else {
reset( $a );
reset( $b );
} else {
reset( $a );
reset( $b );
- while ( ( list( , $valueA ) = each( $a ) ) && ( list( , $valueB ) = each( $b ) ) ) {
+ while ( key( $a ) !== null && key( $b ) !== null ) {
+ $valueA = current( $a );
+ $valueB = current( $b );
$cmp = strcmp( $valueA, $valueB );
if ( $cmp !== 0 ) {
return $cmp;
}
$cmp = strcmp( $valueA, $valueB );
if ( $cmp !== 0 ) {
return $cmp;
}
+ next( $a );
+ next( $b );
}
return 0;
}
}
return 0;
}
@@
-3160,6
+3164,7
@@
function wfShorthandToInteger( $string = '', $default = -1 ) {
/**
* Get the normalised IETF language tag
* See unit test for examples.
/**
* Get the normalised IETF language tag
* See unit test for examples.
+ * See mediawiki.language.bcp47 for the JavaScript implementation.
*
* @param string $code The language code.
* @return string The language code which complying with BCP 47 standards.
*
* @param string $code The language code.
* @return string The language code which complying with BCP 47 standards.