From: Domas Mituzas Date: Thu, 8 Jun 2006 14:11:16 +0000 (+0000) Subject: AutoLoad OutputPage, HistoryBlob, Block, MessageCache, move $wgBlobCache to HistoryBl... X-Git-Tag: 1.31.0-rc.0~56832 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=7b8c86bdb25ae5e5981ecdaa046c1c03d54c9945;p=lhc%2Fweb%2Fwiklou.git AutoLoad OutputPage, HistoryBlob, Block, MessageCache, move $wgBlobCache to HistoryBlobStub static private. --- diff --git a/includes/HistoryBlob.php b/includes/HistoryBlob.php index 8f5d362485..f7c9aea0f2 100644 --- a/includes/HistoryBlob.php +++ b/includes/HistoryBlob.php @@ -174,15 +174,14 @@ 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 ) { @@ -214,9 +213,8 @@ class HistoryBlobStub { /** @todo document */ function getText() { $fname = 'HistoryBlob::getText'; - global $wgBlobCache; - if( isset( $wgBlobCache[$this->mOldId] ) ) { - $obj = $wgBlobCache[$this->mOldId]; + if( isset( HistoryBlobStub::$blobCache[$this->mOldId] ) ) { + $obj = HistoryBlobStub::$blobCache[$this->mOldId]; } else { $dbr =& wfGetDB( DB_SLAVE ); $row = $dbr->selectRow( 'text', array( 'old_flags', 'old_text' ), array( 'old_id' => $this->mOldId ) ); @@ -255,7 +253,7 @@ class HistoryBlobStub { // Save this item for reference; if pulling many // items in a row we'll likely use it again. $obj->uncompress(); - $wgBlobCache = array( $this->mOldId => $obj ); + HistoryBlobStub::$blobCache = array( $this->mOldId => $obj ); } return $obj->getItem( $this->mHash ); } diff --git a/includes/Setup.php b/includes/Setup.php index 14dad72034..2ead1b26b2 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -56,13 +56,9 @@ require_once( 'GlobalFunctions.php' ); require_once( 'Hooks.php' ); require_once( 'Namespace.php' ); require_once( 'User.php' ); -require_once( 'OutputPage.php' ); require_once( 'MagicWord.php' ); -require_once( 'Block.php' ); -require_once( 'MessageCache.php' ); require_once( 'Parser.php' ); require_once( 'LoadBalancer.php' ); -require_once( 'HistoryBlob.php' ); require_once( 'ProxyTools.php' ); require_once( 'ObjectCache.php' ); require_once( 'SpecialPage.php' );