From: Mark A. Hershberger Date: Wed, 6 Jan 2010 03:42:30 +0000 (+0000) Subject: Random eol whitespace found while treking through files. X-Git-Tag: 1.31.0-rc.0~38400 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=9ef63ede4954f2c272b06eed4cbabe73b17dd4aa;p=lhc%2Fweb%2Fwiklou.git Random eol whitespace found while treking through files. Removing unused call to $wgContLang->getFormattedNsText() from addNewUserLogEntry() --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c32952bd8d..3e24457ab0 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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= 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. diff --git a/includes/User.php b/includes/User.php index 68eb4b3d23..2769d431e6 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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 ) ) ) diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 79bb0cdc7f..15126a3088 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -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; } diff --git a/includes/db/LBFactory.php b/includes/db/LBFactory.php index 3876d71f70..10c871338a 100644 --- a/includes/db/LBFactory.php +++ b/includes/db/LBFactory.php @@ -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] )); } diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 90d5f93d36..534e36814a 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -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 diff --git a/maintenance/install-utils.inc b/maintenance/install-utils.inc index 1de2e67e33..565d02e0d8 100644 --- a/maintenance/install-utils.inc +++ b/maintenance/install-utils.inc @@ -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 = 'c'; $xml = '' . htmlspecialchars( $charData ) . ''; - + $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;