Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | * array( array( 'x' ) ), |
166 | 166 | * array( array( 'x', '2' ) ), |
167 | 167 | * array( array( 'x' ) ), |
168 | | - * array( array( 'y') ) |
| 168 | + * array( array( 'y' ) ) |
169 | 169 | * ); |
170 | 170 | * returns: |
171 | 171 | * array( |
— | — | @@ -981,9 +981,10 @@ |
982 | 982 | * a valid code create a language for that language, if |
983 | 983 | * it is a string but not a valid code then make a basic |
984 | 984 | * language object |
985 | | - * - a boolean: if it's false then use the current users |
986 | | - * language (as a fallback for the old parameter |
987 | | - * functionality), or if it is true then use the wikis |
| 985 | + * - a boolean: if it's false then use the global object for |
| 986 | + * the current user's language (as a fallback for the old parameter |
| 987 | + * functionality), or if it is true then use global object |
| 988 | + * for the wiki's content language. |
988 | 989 | * @return Language object |
989 | 990 | */ |
990 | 991 | function wfGetLangObj( $langcode = false ) { |
— | — | @@ -2166,7 +2167,7 @@ |
2167 | 2168 | function wfNegotiateType( $cprefs, $sprefs ) { |
2168 | 2169 | $combine = array(); |
2169 | 2170 | |
2170 | | - foreach( array_keys($sprefs) as $type ) { |
| 2171 | + foreach( array_keys( $sprefs ) as $type ) { |
2171 | 2172 | $parts = explode( '/', $type ); |
2172 | 2173 | if( $parts[1] != '*' ) { |
2173 | 2174 | $ckey = mimeTypeMatch( $type, $cprefs ); |
— | — | @@ -2218,7 +2219,7 @@ |
2219 | 2220 | } else { |
2220 | 2221 | if ( !$suppressCount ) { |
2221 | 2222 | // E_DEPRECATED is undefined in PHP 5.2 |
2222 | | - if( !defined( 'E_DEPRECATED' ) ){ |
| 2223 | + if( !defined( 'E_DEPRECATED' ) ) { |
2223 | 2224 | define( 'E_DEPRECATED', 8192 ); |
2224 | 2225 | } |
2225 | 2226 | $originalLevel = error_reporting( E_ALL & ~( E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_DEPRECATED ) ); |
— | — | @@ -2331,7 +2332,7 @@ |
2332 | 2333 | # TS_POSTGRES |
2333 | 2334 | } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d* GMT$/', $ts, $da ) ) { |
2334 | 2335 | # TS_POSTGRES |
2335 | | - } elseif (preg_match('/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.\d\d\d$/',$ts,$da)) { |
| 2336 | + } elseif (preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.\d\d\d$/', $ts, $da ) ) { |
2336 | 2337 | # TS_DB2 |
2337 | 2338 | } elseif ( preg_match( '/^[ \t\r\n]*([A-Z][a-z]{2},[ \t\r\n]*)?' . # Day of week |
2338 | 2339 | '\d\d?[ \t\r\n]*[A-Z][a-z]{2}[ \t\r\n]*\d{2}(?:\d{2})?' . # dd Mon yyyy |
— | — | @@ -3347,7 +3348,7 @@ |
3348 | 3349 | * @param $version String |
3349 | 3350 | * @return null |
3350 | 3351 | */ |
3351 | | -function wfDeprecated( $function, $version=false ) { |
| 3352 | +function wfDeprecated( $function, $version = false ) { |
3352 | 3353 | static $functionsWarned = array(); |
3353 | 3354 | if ( !isset( $functionsWarned[$function] ) ) { |
3354 | 3355 | $functionsWarned[$function] = true; |
— | — | @@ -3567,7 +3568,7 @@ |
3568 | 3569 | foreach ( $codeSegment as $segNo => $seg ) { |
3569 | 3570 | if ( count( $codeSegment ) > 0 ) { |
3570 | 3571 | // when previous segment is x, it is a private segment and should be lc |
3571 | | - if( $segNo > 0 && strtolower( $codeSegment[($segNo - 1)] ) == 'x') { |
| 3572 | + if( $segNo > 0 && strtolower( $codeSegment[( $segNo - 1 )] ) == 'x' ) { |
3572 | 3573 | $codeBCP[$segNo] = strtolower( $seg ); |
3573 | 3574 | // ISO 3166 country code |
3574 | 3575 | } elseif ( ( strlen( $seg ) == 2 ) && ( $segNo > 0 ) ) { |