* 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 ) {
/** @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 ) );
// 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 );
}
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' );