* (bug 6849) Block @ from usernames; interferes with multi-database tools and
[lhc/web/wiklou.git] / includes / HistoryBlob.php
index 85c41e0..8f5d362 100644 (file)
@@ -174,14 +174,15 @@ class ConcatenatedGzipHistoryBlob extends HistoryBlob
  * the same blob. By keeping the last-used one open, we avoid
  * redundant unserialization and decompression overhead.
  */
+global $wgBlobCache;
+$wgBlobCache = array();
+
 
 /**
  * @package MediaWiki
  */
 class HistoryBlobStub {
        var $mOldId, $mHash, $mRef;
-       
-       static private $blobCache = array();
 
        /** @todo document */
        function HistoryBlobStub( $hash = '', $oldid = 0 ) {
@@ -213,8 +214,9 @@ class HistoryBlobStub {
        /** @todo document */
        function getText() {
                $fname = 'HistoryBlob::getText';
-               if( isset( HistoryBlobStub::$blobCache[$this->mOldId] ) ) {
-                       $obj = HistoryBlobStub::$blobCache[$this->mOldId];
+               global $wgBlobCache;
+               if( isset( $wgBlobCache[$this->mOldId] ) ) {
+                       $obj = $wgBlobCache[$this->mOldId];
                } else {
                        $dbr =& wfGetDB( DB_SLAVE );
                        $row = $dbr->selectRow( 'text', array( 'old_flags', 'old_text' ), array( 'old_id' => $this->mOldId ) );
@@ -253,7 +255,7 @@ class HistoryBlobStub {
                        // Save this item for reference; if pulling many
                        // items in a row we'll likely use it again.
                        $obj->uncompress();
-                       HistoryBlobStub::$blobCache = array( $this->mOldId => $obj );
+                       $wgBlobCache = array( $this->mOldId => $obj );
                }
                return $obj->getItem( $this->mHash );
        }