http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97445

Revision: 97445
Author:   krinkle
Date:     2011-09-18 23:21:46 +0000 (Sun, 18 Sep 2011)
Log Message:
-----------
Minor whitespace fixes in GlobalFunctions.php
* And some adjustments to documentation (sentence ended with "use the wikis", 
adjusted to "use the wikis' content language")
[svnblameutil:] r97136,r88447,r86368,r81597,r72134,r2969

Modified Paths:
--------------
    trunk/phase3/includes/GlobalFunctions.php

Modified: trunk/phase3/includes/GlobalFunctions.php
===================================================================
--- trunk/phase3/includes/GlobalFunctions.php   2011-09-18 22:06:31 UTC (rev 
97444)
+++ trunk/phase3/includes/GlobalFunctions.php   2011-09-18 23:21:46 UTC (rev 
97445)
@@ -164,7 +164,7 @@
  *             array( array( 'x' ) ),
  *             array( array( 'x', '2' ) ),
  *             array( array( 'x' ) ),
- *             array( array( 'y') )
+ *             array( array( 'y' ) )
  *     );
  * returns:
  *             array(
@@ -981,9 +981,10 @@
  *                    a valid code create a language for that language, if
  *                    it is a string but not a valid code then make a basic
  *                    language object
- *                  - a boolean: if it's false then use the current users
- *                    language (as a fallback for the old parameter
- *                    functionality), or if it is true then use the wikis
+ *                  - a boolean: if it's false then use the global object for
+ *                    the current user's language (as a fallback for the old 
parameter
+ *                    functionality), or if it is true then use global object
+ *                    for the wiki's content language.
  * @return Language object
  */
 function wfGetLangObj( $langcode = false ) {
@@ -2166,7 +2167,7 @@
 function wfNegotiateType( $cprefs, $sprefs ) {
        $combine = array();
 
-       foreach( array_keys($sprefs) as $type ) {
+       foreach( array_keys( $sprefs ) as $type ) {
                $parts = explode( '/', $type );
                if( $parts[1] != '*' ) {
                        $ckey = mimeTypeMatch( $type, $cprefs );
@@ -2218,7 +2219,7 @@
        } else {
                if ( !$suppressCount ) {
                        // E_DEPRECATED is undefined in PHP 5.2
-                       if( !defined( 'E_DEPRECATED' ) ){
+                       if( !defined( 'E_DEPRECATED' ) ) {
                                define( 'E_DEPRECATED', 8192 );
                        }
                        $originalLevel = error_reporting( E_ALL & ~( E_WARNING 
| E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_DEPRECATED ) );
@@ -2331,7 +2332,7 @@
                # TS_POSTGRES
        } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) 
(\d\d):(\d\d):(\d\d)\.*\d* GMT$/', $ts, $da ) ) {
                # TS_POSTGRES
-       } elseif (preg_match('/^(\d{4})\-(\d\d)\-(\d\d) 
(\d\d):(\d\d):(\d\d)\.\d\d\d$/',$ts,$da)) {
+       } elseif (preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) 
(\d\d):(\d\d):(\d\d)\.\d\d\d$/', $ts, $da ) ) {
                # TS_DB2
        } elseif ( preg_match( '/^[ \t\r\n]*([A-Z][a-z]{2},[ \t\r\n]*)?' . # 
Day of week
                                                        '\d\d?[ 
\t\r\n]*[A-Z][a-z]{2}[ \t\r\n]*\d{2}(?:\d{2})?' .  # dd Mon yyyy
@@ -3347,7 +3348,7 @@
  * @param $version String
  * @return null
  */
-function wfDeprecated( $function, $version=false ) {
+function wfDeprecated( $function, $version = false ) {
        static $functionsWarned = array();
        if ( !isset( $functionsWarned[$function] ) ) {
                $functionsWarned[$function] = true;
@@ -3567,7 +3568,7 @@
        foreach ( $codeSegment as $segNo => $seg ) {
                if ( count( $codeSegment ) > 0 ) {
                        // when previous segment is x, it is a private segment 
and should be lc
-                       if( $segNo > 0 && strtolower( $codeSegment[($segNo - 
1)] ) == 'x') {
+                       if( $segNo > 0 && strtolower( $codeSegment[( $segNo - 1 
)] ) == 'x' ) {
                                $codeBCP[$segNo] = strtolower( $seg );
                        // ISO 3166 country code
                        } elseif ( ( strlen( $seg ) == 2 ) && ( $segNo > 0 ) ) {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to