From: Jens Frank Date: Mon, 23 May 2005 06:30:29 +0000 (+0000) Subject: Make HistoryStub ExternalStore-aware. Renamed external table, so that it can be insid... X-Git-Tag: 1.5.0alpha2~121 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=aa8d2db46d4cdf8b388c057e72fa388727fecc9e;p=lhc%2Fweb%2Fwiklou.git Make HistoryStub ExternalStore-aware. Renamed external table, so that it can be inside of the same DB for testing purposes --- diff --git a/includes/ExternalStoreDB.php b/includes/ExternalStoreDB.php index ce30d2ee13..9d12dc61a7 100644 --- a/includes/ExternalStoreDB.php +++ b/includes/ExternalStoreDB.php @@ -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; } diff --git a/includes/HistoryBlob.php b/includes/HistoryBlob.php index a210f7c99b..f7fa77afd3 100644 --- a/includes/HistoryBlob.php +++ b/includes/HistoryBlob.php @@ -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; }