Index: trunk/phase3/includes/Setup.php |
— | — | @@ -56,13 +56,9 @@ |
57 | 57 | require_once( 'Hooks.php' ); |
58 | 58 | require_once( 'Namespace.php' ); |
59 | 59 | require_once( 'User.php' ); |
60 | | -require_once( 'OutputPage.php' ); |
61 | 60 | require_once( 'MagicWord.php' ); |
62 | | -require_once( 'Block.php' ); |
63 | | -require_once( 'MessageCache.php' ); |
64 | 61 | require_once( 'Parser.php' ); |
65 | 62 | require_once( 'LoadBalancer.php' ); |
66 | | -require_once( 'HistoryBlob.php' ); |
67 | 63 | require_once( 'ProxyTools.php' ); |
68 | 64 | require_once( 'ObjectCache.php' ); |
69 | 65 | require_once( 'SpecialPage.php' ); |
Index: trunk/phase3/includes/HistoryBlob.php |
— | — | @@ -174,15 +174,14 @@ |
175 | 175 | * the same blob. By keeping the last-used one open, we avoid |
176 | 176 | * redundant unserialization and decompression overhead. |
177 | 177 | */ |
178 | | -global $wgBlobCache; |
179 | | -$wgBlobCache = array(); |
180 | 178 | |
181 | | - |
182 | 179 | /** |
183 | 180 | * @package MediaWiki |
184 | 181 | */ |
185 | 182 | class HistoryBlobStub { |
186 | 183 | var $mOldId, $mHash, $mRef; |
| 184 | + |
| 185 | + static private blobCache = array(); |
187 | 186 | |
188 | 187 | /** @todo document */ |
189 | 188 | function HistoryBlobStub( $hash = '', $oldid = 0 ) { |
— | — | @@ -214,9 +213,8 @@ |
215 | 214 | /** @todo document */ |
216 | 215 | function getText() { |
217 | 216 | $fname = 'HistoryBlob::getText'; |
218 | | - global $wgBlobCache; |
219 | | - if( isset( $wgBlobCache[$this->mOldId] ) ) { |
220 | | - $obj = $wgBlobCache[$this->mOldId]; |
| 217 | + if( isset( HistoryBlobStub::$blobCache[$this->mOldId] ) ) { |
| 218 | + $obj = HistoryBlobStub::$blobCache[$this->mOldId]; |
221 | 219 | } else { |
222 | 220 | $dbr =& wfGetDB( DB_SLAVE ); |
223 | 221 | $row = $dbr->selectRow( 'text', array( 'old_flags', 'old_text' ), array( 'old_id' => $this->mOldId ) ); |
— | — | @@ -255,7 +253,7 @@ |
256 | 254 | // Save this item for reference; if pulling many |
257 | 255 | // items in a row we'll likely use it again. |
258 | 256 | $obj->uncompress(); |
259 | | - $wgBlobCache = array( $this->mOldId => $obj ); |
| 257 | + HistoryBlobStub::$blobCache = array( $this->mOldId => $obj ); |
260 | 258 | } |
261 | 259 | return $obj->getItem( $this->mHash ); |
262 | 260 | } |