Make HistoryStub ExternalStore-aware. Renamed external table, so that it can be insid...
authorJens Frank <jeluf@users.mediawiki.org>
Mon, 23 May 2005 06:30:29 +0000 (06:30 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Mon, 23 May 2005 06:30:29 +0000 (06:30 +0000)
includes/ExternalStoreDB.php
includes/HistoryBlob.php

index ce30d2e..9d12dc6 100644 (file)
@@ -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;
        }
index a210f7c..f7fa77a 100644 (file)
@@ -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;
                        }