Make HistoryStub ExternalStore-aware. Renamed external table, so that it can be inside of the same DB for testing purposes
This commit is contained in:
parent
f9039cefd9
commit
aa8d2db46d
2 changed files with 12 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ class ExternalStoreDB {
|
|||
$lb = LoadBalancer::NewFromParams( $wgExternalServers[$cluster] );
|
||||
$db = $lb->getConnection( DB_SLAVE );
|
||||
|
||||
$ret = $db->selectField( 'text', 'text_text', array( 'text_id' => $id ) );
|
||||
$ret = $db->selectField( 'blobs', 'blob_text', array( 'blob_id' => $id ) );
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,6 +209,17 @@ class HistoryBlobStub {
|
|||
return false;
|
||||
}
|
||||
$flags = explode( ',', $row->old_flags );
|
||||
if( in_array( 'external', $flags ) ) {
|
||||
$url=$row->old_text;
|
||||
@list($proto,$path)=explode('://',$url,2);
|
||||
if ($path=="") {
|
||||
wfProfileOut( $fname );
|
||||
return false;
|
||||
}
|
||||
require_once('ExternalStore.php');
|
||||
$row->old_text=ExternalStore::fetchFromUrl($url);
|
||||
|
||||
}
|
||||
if( !in_array( 'object', $flags ) ) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue