Merge "Refactored Special:ActiveUsers queries to remove filesort/temp table."
[lhc/web/wiklou.git] / includes / HistoryBlob.php
index 1af733a..46cf238 100644 (file)
@@ -143,7 +143,7 @@ class ConcatenatedGzipHistoryBlob implements HistoryBlob
         * Compress the bulk data in the object
         */
        public function compress() {
-               if ( !$this->mCompressed  ) {
+               if ( !$this->mCompressed ) {
                        $this->mItems = gzdeflate( serialize( $this->mItems ) );
                        $this->mCompressed = true;
                }
@@ -231,16 +231,16 @@ class HistoryBlobStub {
         * @return string
         */
        function getText() {
-               if( isset( self::$blobCache[$this->mOldId] ) ) {
+               if ( isset( self::$blobCache[$this->mOldId] ) ) {
                        $obj = self::$blobCache[$this->mOldId];
                } else {
                        $dbr = wfGetDB( DB_SLAVE );
                        $row = $dbr->selectRow( 'text', array( 'old_flags', 'old_text' ), array( 'old_id' => $this->mOldId ) );
-                       if( !$row ) {
+                       if ( !$row ) {
                                return false;
                        }
                        $flags = explode( ',', $row->old_flags );
-                       if( in_array( 'external', $flags ) ) {
+                       if ( in_array( 'external', $flags ) ) {
                                $url = $row->old_text;
                                $parts = explode( '://', $url, 2 );
                                if ( !isset( $parts[1] ) || $parts[1] == '' ) {
@@ -249,11 +249,11 @@ class HistoryBlobStub {
                                $row->old_text = ExternalStore::fetchFromUrl( $url );
 
                        }
-                       if( !in_array( 'object', $flags ) ) {
+                       if ( !in_array( 'object', $flags ) ) {
                                return false;
                        }
 
-                       if( in_array( 'gzip', $flags ) ) {
+                       if ( in_array( 'gzip', $flags ) ) {
                                // This shouldn't happen, but a bug in the compress script
                                // may at times gzip-compress a HistoryBlob object row.
                                $obj = unserialize( gzinflate( $row->old_text ) );
@@ -261,7 +261,7 @@ class HistoryBlobStub {
                                $obj = unserialize( $row->old_text );
                        }
 
-                       if( !is_object( $obj ) ) {
+                       if ( !is_object( $obj ) ) {
                                // Correct for old double-serialization bug.
                                $obj = unserialize( $obj );
                        }
@@ -318,7 +318,7 @@ class HistoryBlobCurStub {
        function getText() {
                $dbr = wfGetDB( DB_SLAVE );
                $row = $dbr->selectRow( 'cur', array( 'cur_text' ), array( 'cur_id' => $this->mCurId ) );
-               if( !$row ) {
+               if ( !$row ) {
                        return false;
                }
                return $row->cur_text;