Random eol whitespace found while treking through files.
authorMark A. Hershberger <mah@users.mediawiki.org>
Wed, 6 Jan 2010 03:42:30 +0000 (03:42 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Wed, 6 Jan 2010 03:42:30 +0000 (03:42 +0000)
Removing unused call to $wgContLang->getFormattedNsText() from addNewUserLogEntry()

includes/DefaultSettings.php
includes/User.php
includes/WebRequest.php
includes/db/LBFactory.php
maintenance/Maintenance.php
maintenance/install-utils.inc

index c32952b..3e24457 100644 (file)
@@ -471,7 +471,7 @@ $wgMaxUploadSize = 1024*1024*100; # 100MB
  * Useful if you want to use a shared repository by default
  * without disabling local uploads (use $wgEnableUploads = false for that)
  * e.g. $wgUploadNavigationUrl = 'http://commons.wikimedia.org/wiki/Special:Upload';
- * 
+ *
  * This also affects images inline images that do not exist. In that case the URL will get
  * (?|&)wpDestFile=<filename> appended to it as appropriate.
  */
@@ -715,8 +715,8 @@ $wgDBservers                = false;
  */
 $wgLBFactoryConf    = array( 'class' => 'LBFactory_Simple' );
 
-/** 
- * Unique identifier if you're paranoid and don't want $wgDBname as part of 
+/**
+ * Unique identifier if you're paranoid and don't want $wgDBname as part of
  * wfWikiId(). See bug 21086
  */
 $wgWikiId = false;
@@ -866,14 +866,14 @@ $wgInputEncoding  = 'UTF-8';
 $wgOutputEncoding = 'UTF-8';
 $wgEditEncoding   = '';
 
-/** 
- * Set this to true to clean up archaic Unicode sequences in Arabic and 
+/**
+ * Set this to true to clean up archaic Unicode sequences in Arabic and
  * Malayalam text. Currently only works if $wgLanguageCode is set to Arabic
  * or Malayalam.
  *
- * Enabling this is generally a good idea for new wikis, since it fixes a few 
- * technical problems to do with editing these languages. However, if it's 
- * enabled on an existing wiki, pages which contain the problematic characters 
+ * Enabling this is generally a good idea for new wikis, since it fixes a few
+ * technical problems to do with editing these languages. However, if it's
+ * enabled on an existing wiki, pages which contain the problematic characters
  * in their page titles may become inaccessible. Running maintenance/cleanupTitles.php
  * after enabling it may fix this.
  */
@@ -936,7 +936,7 @@ $wgHtml5 = true;
 $wgHtml5Version = null;
 
 /**
- * Enabled RDFa attributes for use in wikitext. 
+ * Enabled RDFa attributes for use in wikitext.
  * NOTE: Interaction with HTML5 is somewhat underspecified.
  */
 $wgAllowRdfaAttributes = true;
@@ -1040,17 +1040,17 @@ $wgDisabledVariants = array();
  * Like $wgArticlePath, but on multi-variant wikis, this provides a
  * path format that describes which parts of the URL contain the
  * language variant.  For Example:
- * 
+ *
  *   $wgLanguageCode = 'sr';
  *   $wgVariantArticlePath = '/$2/$1';
  *   $wgArticlePath = '/wiki/$1';
- * 
+ *
  * A link to /wiki/ would be redirected to /sr/Главна_страна
  *
  * It is important that $wgArticlePath not overlap with possible values
  * of $wgVariantArticlePath.
  */
-$wgVariantArticlePath = false;///< defaults to false 
+$wgVariantArticlePath = false;///< defaults to false
 
 /**
  * Show a bar of language selection links in the user login and user
@@ -1932,8 +1932,8 @@ $wgSpecialPageCacheUpdates = array(
 $wgUseTeX = false;
 /** Location of the texvc binary */
 $wgTexvc = './math/texvc';
-/** 
-  * Texvc background color 
+/**
+  * Texvc background color
   * use LaTeX color format as used in \special function
   * for transparent background use value 'Transparent' for alpha transparency or
   * 'transparent' for binary transparency.
index 68eb4b3..2769d43 100644 (file)
@@ -216,7 +216,7 @@ class User {
                $mBlockreason, $mBlock, $mEffectiveGroups, $mBlockedGlobally,
                $mLocked, $mHideName, $mOptions;
        //@}
-       
+
        static $idCacheByName = array();
 
        /**
@@ -636,12 +636,12 @@ class User {
         */
        function getPasswordValidity( $password ) {
                global $wgMinimalPasswordLength, $wgContLang;
-               
+
                $result = false; //init $result to false for the internal checks
-               
+
                if( !wfRunHooks( 'isValidPassword', array( $password, &$result, $this ) ) )
                        return $result;
-               
+
                if ( $result === false ) {
                        if( strlen( $password ) < $wgMinimalPasswordLength ) {
                                return 'passwordtooshort';
@@ -1055,7 +1055,7 @@ class User {
                        $defOpt['searchNs'.$nsnum] = !empty( $wgNamespacesToBeSearchedDefault[$nsnum] );
                }
                $defOpt['skin'] = $wgDefaultSkin;
-               
+
                return $defOpt;
        }
 
@@ -1392,9 +1392,9 @@ class User {
                        $blocked = false;
                        wfDebug( __METHOD__ . ": self-talk page, ignoring any blocks\n" );
                }
-               
+
                wfRunHooks( 'UserIsBlockedFrom', array( $this, $title, &$blocked, &$allowUsertalk ) );
-               
+
                wfProfileOut( __METHOD__ );
                return $blocked;
        }
@@ -2525,9 +2525,9 @@ class User {
                                'user_id' => $this->mId
                        ), __METHOD__
                );
-               
+
                $this->saveOptions();
-               
+
                wfRunHooks( 'UserSaveSettings', array( $this ) );
                $this->clearSharedCache();
                $this->getUserPage()->invalidateCache();
@@ -2626,7 +2626,7 @@ class User {
 
                // Clear instance cache other than user table data, which is already accurate
                $this->clearInstanceCache();
-               
+
                $this->saveOptions();
        }
 
@@ -3563,11 +3563,11 @@ class User {
         * @param $byEmail Boolean: account made by email?
         */
        public function addNewUserLogEntry( $byEmail = false ) {
-               global $wgUser, $wgContLang, $wgNewUserLog;
+               global $wgUser, $wgNewUserLog;
                if( empty( $wgNewUserLog ) ) {
                        return true; // disabled
                }
-               $talk = $wgContLang->getFormattedNsText( NS_TALK );
+
                if( $this->getName() == $wgUser->getName() ) {
                        $action = 'create';
                        $message = '';
@@ -3650,11 +3650,11 @@ class User {
 
                $this->loadOptions();
                $dbw = wfGetDB( DB_MASTER );
-               
+
                $insert_rows = array();
-               
+
                $saveOptions = $this->mOptions;
-               
+
                // Allow hooks to abort, for instance to save to a global profile.
                // Reset options to default state before saving.
                if( !wfRunHooks( 'UserSaveOptions', array( $this, &$saveOptions ) ) )
index 79bb0cd..15126a3 100644 (file)
@@ -39,7 +39,7 @@ if ( !function_exists( '__autoload' ) ) {
  * not create a second WebRequest object; make a FauxRequest object if
  * you want to pass arbitrary data to some function in place of the web
  * input.
- * 
+ *
  * @ingroup HTTP
  */
 class WebRequest {
@@ -66,11 +66,13 @@ class WebRequest {
         */
        public function interpolateTitle() {
                global $wgUsePathInfo;
+
                if ( $wgUsePathInfo ) {
                        // PATH_INFO is mangled due to http://bugs.php.net/bug.php?id=31892
                        // And also by Apache 2.x, double slashes are converted to single slashes.
                        // So we will use REQUEST_URI if possible.
                        $matches = array();
+
                        if ( !empty( $_SERVER['REQUEST_URI'] ) ) {
                                // Slurp out the path portion to examine...
                                $url = $_SERVER['REQUEST_URI'];
@@ -180,7 +182,7 @@ class WebRequest {
         */
        private function checkMagicQuotes() {
                $mustFixQuotes = function_exists( 'get_magic_quotes_gpc' )
-                       && get_magic_quotes_gpc();              
+                       && get_magic_quotes_gpc();
                if( $mustFixQuotes ) {
                        $this->fix_magic_quotes( $_COOKIE );
                        $this->fix_magic_quotes( $_ENV );
@@ -260,7 +262,7 @@ class WebRequest {
                        return (string)$val;
                }
        }
-       
+
        /**
         * Set an aribtrary value into our get/post data.
         * @param $key string Key name to use
@@ -653,7 +655,7 @@ class WebRequest {
                        }
                }
        }
-       
+
        /*
         * Get data from $_SESSION
         * @param $key String Name of key in $_SESSION
@@ -664,7 +666,7 @@ class WebRequest {
                        return null;
                return $_SESSION[$key];
        }
-       
+
        /**
         * Set session data
         * @param $key String Name of key in $_SESSION
@@ -675,20 +677,20 @@ class WebRequest {
        }
 
        /**
-        * Returns true if the PATH_INFO ends with an extension other than a script 
+        * Returns true if the PATH_INFO ends with an extension other than a script
         * extension. This could confuse IE for scripts that send arbitrary data which
         * is not HTML but may be detected as such.
         *
-        * Various past attempts to use the URL to make this check have generally 
-        * run up against the fact that CGI does not provide a standard method to 
-        * determine the URL. PATH_INFO may be mangled (e.g. if cgi.fix_pathinfo=0), 
-        * but only by prefixing it with the script name and maybe some other stuff, 
-        * the extension is not mangled. So this should be a reasonably portable 
+        * Various past attempts to use the URL to make this check have generally
+        * run up against the fact that CGI does not provide a standard method to
+        * determine the URL. PATH_INFO may be mangled (e.g. if cgi.fix_pathinfo=0),
+        * but only by prefixing it with the script name and maybe some other stuff,
+        * the extension is not mangled. So this should be a reasonably portable
         * way to perform this security check.
         */
        public function isPathInfoBad() {
                global $wgScriptExtension;
-               
+
                if ( !isset( $_SERVER['PATH_INFO'] ) ) {
                        return false;
                }
index 3876d71..10c8713 100644 (file)
@@ -25,7 +25,7 @@ abstract class LBFactory {
 
        /**
         * Shut down, close connections and destroy the cached instance.
-        * 
+        *
         */
        static function destroyInstance() {
                if ( self::$instance ) {
@@ -41,7 +41,7 @@ abstract class LBFactory {
        abstract function __construct( $conf );
 
        /**
-        * Create a new load balancer object. The resulting object will be untracked, 
+        * Create a new load balancer object. The resulting object will be untracked,
         * not chronology-protected, and the caller is responsible for cleaning it up.
         *
         * @param string $wiki Wiki ID, or false for the current wiki
@@ -58,8 +58,8 @@ abstract class LBFactory {
        abstract function getMainLB( $wiki = false );
 
        /*
-        * Create a new load balancer for external storage. The resulting object will be 
-        * untracked, not chronology-protected, and the caller is responsible for 
+        * Create a new load balancer for external storage. The resulting object will be
+        * untracked, not chronology-protected, and the caller is responsible for
         * cleaning it up.
         *
         * @param string $cluster External storage cluster, or false for core
@@ -142,8 +142,8 @@ class LBFactory_Simple extends LBFactory {
                }
 
                return new LoadBalancer( array(
-                       'servers' => $servers, 
-                       'masterWaitTimeout' => $wgMasterWaitTimeout 
+                       'servers' => $servers,
+                       'masterWaitTimeout' => $wgMasterWaitTimeout
                ));
        }
 
@@ -162,7 +162,7 @@ class LBFactory_Simple extends LBFactory {
                        throw new MWException( __METHOD__.": Unknown cluster \"$cluster\"" );
                }
                return new LoadBalancer( array(
-                       'servers' => $wgExternalServers[$cluster] 
+                       'servers' => $wgExternalServers[$cluster]
                ));
        }
 
index 90d5f93..534e368 100644 (file)
@@ -373,7 +373,7 @@ abstract class Maintenance {
                $this->maybeHelp();
                $this->validateParamsAndArgs();
        }
-       
+
        /**
         * Normally we disable the memory_limit when running admin scripts.
         * Some scripts may wish to actually set a limit, however, to avoid
index 1de2e67..565d02e 100644 (file)
@@ -23,7 +23,7 @@ function install_version_checks() {
    "to continue installation. ABORTING.\n";
                die( -1 );
        }
-       
+
        // Test for PHP bug which breaks PHP 5.0.x on 64-bit...
        // As of 1.8 this breaks lots of common operations instead
        // of just some rare ones like export.
@@ -33,7 +33,7 @@ function install_version_checks() {
                        "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n";
                die( -1 );
        }
-       
+
        $test = new PhpXmlBugTester();
        if( !$test->ok ) {
                echo "Your system has a combination of PHP and libxml2 versions which is buggy\n" .
@@ -42,7 +42,7 @@ function install_version_checks() {
                        "ABORTING (http://bugs.php.net/bug.php?id=45996 for details).\n";
                die( -1 );
        }
-       
+
 
        global $wgCommandLineMode;
        $wgCommandLineMode = true;
@@ -61,7 +61,7 @@ class PhpXmlBugTester {
        public function __construct() {
                $charData = '<b>c</b>';
                $xml = '<a>' . htmlspecialchars( $charData ) . '</a>';
-               
+
                $parser = xml_parser_create();
                xml_set_character_data_handler( $parser, array( $this, 'chardata' ) );
                $parsedOk = xml_parse($parser, $xml, true);
@@ -121,7 +121,7 @@ function readlineEmulation( $prompt ) {
                $command = "read -er -p $encPrompt && echo \"\$REPLY\"";
                $encCommand = wfEscapeShellArg( $command );
                $line = wfShellExec( "$bash -c $encCommand", $retval );
-               
+
                if( $retval == 0 ) {
                        return $line;
                } elseif( $retval == 127 ) {
@@ -133,7 +133,7 @@ function readlineEmulation( $prompt ) {
                        return false;
                }
        }
-       
+
        // Fallback... we'll have no editing controls, EWWW
        if ( feof( STDIN ) ) {
                return false;