$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;
}
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;
}