}
/**
+ * @param bool|string $wikiId The ID of the target wiki database. Use false for the local wiki.
+ *
* @return SqlBlobStore
*/
- protected static function getBlobStore() {
- $store = MediaWikiServices::getInstance()->getBlobStore();
+ protected static function getBlobStore( $wiki = false ) {
+ $store = MediaWikiServices::getInstance()
+ ->getBlobStoreFactory()
+ ->newSqlBlobStore( $wiki );
if ( !$store instanceof SqlBlobStore ) {
throw new RuntimeException(
*
* @param int $id
* @param int $flags (optional)
- * @param Title $title (optional)
* @return Revision|null
*/
- public static function newFromId( $id, $flags = 0, Title $title = null ) {
- $rec = self::getRevisionStore()->getRevisionById( $id, $flags, $title );
- return $rec === null ? null : new Revision( $rec, $flags, $title );
+ public static function newFromId( $id, $flags = 0 ) {
+ $rec = self::getRevisionStore()->getRevisionById( $id, $flags );
+ return $rec === null ? null : new Revision( $rec, $flags );
}
/**
$cacheKey = isset( $row->old_id ) ? ( 'tt:' . $row->old_id ) : null;
- return self::getBlobStore()->expandBlob( $text, $flags, $cacheKey );
+ return self::getBlobStore( $wiki )->expandBlob( $text, $flags, $cacheKey );
}
/**