Random whitespace cleanup
authorMark A. Hershberger <mah@users.mediawiki.org>
Fri, 5 Feb 2010 04:25:30 +0000 (04:25 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Fri, 5 Feb 2010 04:25:30 +0000 (04:25 +0000)
includes/MessageCache.php
includes/Namespace.php
includes/upload/UploadFromUrl.php

index e5eb705..d48bc6c 100644 (file)
@@ -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
                                '&#32;' => ' ',
@@ -677,7 +677,7 @@ class MessageCache {
 
        function disable() { $this->mDisable = true; }
        function enable() { $this->mDisable = false; }
+
        /** @deprecated */
        function disableTransform(){
                wfDeprecated( __METHOD__ );
index 974036c..e8e7523 100644 (file)
@@ -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;
index 398f50f..1975e93 100644 (file)
@@ -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;
                }