Merge "Add semantic tags to license info text"
[lhc/web/wiklou.git] / includes / Storage / SqlBlobStore.php
index 0714633..69e1539 100644 (file)
@@ -228,7 +228,7 @@ class SqlBlobStore implements IDBAccessObject, BlobStore {
                                // used. We'll need to assess expected fallout before doing that.
                        }
 
-                       $dbw = $this->getDBConnection( DB_REPLICA );
+                       $dbw = $this->getDBConnection( DB_MASTER );
 
                        $old_id = $dbw->nextSequenceValue( 'text_old_id_seq' );
                        $dbw->insert(
@@ -382,7 +382,7 @@ class SqlBlobStore implements IDBAccessObject, BlobStore {
                                return false;
                        }
 
-                       if ( $cacheKey ) {
+                       if ( $cacheKey && $this->wikiId === false ) {
                                // Make use of the wiki-local revision text cache.
                                // The cached value should be decompressed, so handle that and return here.
                                // NOTE: we rely on $this->cache being the right cache for $this->wikiId!