From: Mark A. Hershberger Date: Fri, 5 Feb 2010 04:25:30 +0000 (+0000) Subject: Random whitespace cleanup X-Git-Tag: 1.31.0-rc.0~37922 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=5162f49f97e6f59bc1fdd949ee05e619e0521ea8;p=lhc%2Fweb%2Fwiklou.git Random whitespace cleanup --- diff --git a/includes/MessageCache.php b/includes/MessageCache.php index e5eb7057eb..d48bc6cdfd 100644 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -256,7 +256,7 @@ class MessageCache { $this->lock($cacheKey); - # Limit the concurrency of loadFromDB to a single process + # Limit the concurrency of loadFromDB to a single process # This prevents the site from going down when the cache expires $statusKey = wfMemcKey( 'messages', $code, 'status' ); $success = $this->mMemc->add( $statusKey, 'loading', MSG_LOAD_TIMEOUT ); @@ -562,7 +562,7 @@ class MessageCache { } # Fix whitespace - $message = strtr( $message, + $message = strtr( $message, array( # Fix for trailing whitespace, removed by textarea ' ' => ' ', @@ -677,7 +677,7 @@ class MessageCache { function disable() { $this->mDisable = true; } function enable() { $this->mDisable = false; } - + /** @deprecated */ function disableTransform(){ wfDeprecated( __METHOD__ ); diff --git a/includes/Namespace.php b/includes/Namespace.php index 974036cf69..e8e7523fc2 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -46,8 +46,8 @@ if( isset( $wgExtraNamespaces ) && is_array( $wgExtraNamespaces ) ) { class MWNamespace { /** - * These namespaces should always be first-letter capitalized, now and - * forevermore. Historically, they could've probably been lowercased too, + * These namespaces should always be first-letter capitalized, now and + * forevermore. Historically, they could've probably been lowercased too, * but some things are just too ingrained now. :) */ private static $alwaysCapitalizedNamespaces = array( NS_SPECIAL, NS_USER, NS_MEDIAWIKI ); @@ -107,7 +107,7 @@ class MWNamespace { ? $index - 1 : $index; } - + /** * Returns whether the specified namespace exists */ @@ -162,7 +162,7 @@ class MWNamespace { * @return bool */ public static function canTalk( $index ) { - return $index >= NS_MAIN; + return $index >= NS_MAIN; } /** @@ -197,10 +197,10 @@ class MWNamespace { global $wgNamespacesWithSubpages; return !empty( $wgNamespacesWithSubpages[$index] ); } - + /** * Is the namespace first-letter capitalized? - * + * * @param $index int Index to check * @return bool */ @@ -208,10 +208,10 @@ class MWNamespace { global $wgCapitalLinks, $wgCapitalLinkOverrides; // Turn NS_MEDIA into NS_FILE $index = $index === NS_MEDIA ? NS_FILE : $index; - + // Make sure to get the subject of our namespace $index = self::getSubject( $index ); - + // Some namespaces are special and should always be upper case if ( in_array( $index, self::$alwaysCapitalizedNamespaces ) ) { return true; diff --git a/includes/upload/UploadFromUrl.php b/includes/upload/UploadFromUrl.php index 398f50f42e..1975e93357 100644 --- a/includes/upload/UploadFromUrl.php +++ b/includes/upload/UploadFromUrl.php @@ -2,9 +2,9 @@ /** * @file * @ingroup upload - * + * * Implements uploading from a HTTP resource. - * + * * @author Bryan Tong Minh * @author Michael Dale */ @@ -12,7 +12,7 @@ class UploadFromUrl extends UploadBase { protected $mTempDownloadPath; /** - * Checks if the user is allowed to use the upload-by-URL feature. If the + * Checks if the user is allowed to use the upload-by-URL feature. If the * user is allowed, pass on permissions checking to the parent. */ public static function isAllowed( $user ) { @@ -29,8 +29,8 @@ class UploadFromUrl extends UploadBase { return $wgAllowCopyUploads && parent::isEnabled(); } - /** - * Entry point for API upload + /** + * Entry point for API upload */ public function initialize( $name, $url, $na, $nb = false ) { global $wgTmpDirectory; @@ -51,7 +51,7 @@ class UploadFromUrl extends UploadBase { $desiredDestName = $request->getText( 'wpUploadFileURL' ); return $this->initialize( $desiredDestName, - $request->getVal( 'wpUploadFileURL' ), + $request->getVal( 'wpUploadFileURL' ), false ); } @@ -70,7 +70,7 @@ class UploadFromUrl extends UploadBase { // Only allow HTTP or FTP for now return (bool)preg_match( '!^(http://|ftp://)!', $url ); } - + /** * Do the real fetching stuff */ @@ -84,7 +84,7 @@ class UploadFromUrl extends UploadBase { } return Status::newGood(); } - + /** * Safe copy from URL * Returns true if there was an error, false otherwise @@ -111,13 +111,13 @@ class UploadFromUrl extends UploadBase { fclose( $this->mCurlDestHandle ); unset( $this->mCurlDestHandle ); - - if( $error ) + + if( $error ) return "upload-curl-error$errornum"; return true; } - + /** * Callback function for CURL-based web transfer * Write data to file unless we've passed the length limit; @@ -127,7 +127,7 @@ class UploadFromUrl extends UploadBase { function uploadCurlCallback( $ch, $data ) { global $wgMaxUploadSize; $length = strlen( $data ); - $this->mFileSize += $length; + $this->mFileSize += $length; if( $this->mFileSize > $wgMaxUploadSize ) { return 0; }