MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384194 )

Change subject: DB_SLAVE --> DB_REPLICA
......................................................................

DB_SLAVE --> DB_REPLICA

Change-Id: I92f3f29fb9a026a359b4bc00c1f5bc37807aa091
---
M includes/PageData.php
M includes/Storage/Schema.php
M tests/phpunit/StorageWikiPage_Test.php
3 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTagsStorage 
refs/changes/94/384194/1

diff --git a/includes/PageData.php b/includes/PageData.php
index 16f6fe8..616a728 100644
--- a/includes/PageData.php
+++ b/includes/PageData.php
@@ -94,7 +94,7 @@
                }
 
                \PhpTagsStorage\Schema::loadSchema( $templates );
-               $db = wfGetDB( DB_SLAVE, 'PhpTags' );
+               $db = wfGetDB( DB_REPLICA, 'PhpTags' );
                foreach ( $templates as $t ) {
                        $fields = \PhpTagsStorage\Schema::getTemplateFields( $t 
);
                        $res = $db->select( 
\PhpTagsStorage\Schema::TABLE_PREFIX . $t, '*', array('page_id'=>$pageID) );
diff --git a/includes/Storage/Schema.php b/includes/Storage/Schema.php
index b2c8ae4..face60c 100644
--- a/includes/Storage/Schema.php
+++ b/includes/Storage/Schema.php
@@ -82,7 +82,7 @@
                        return self::$pageTemplates[$pageID];
                }
 
-               $db = wfGetDB( DB_SLAVE );
+               $db = wfGetDB( DB_REPLICA );
                $rowTemplates = $db->selectRow( self::TABLE_PAGE_TEMPLATES , 
'templates', array('page_id'=>$pageID) );
                if ( $rowTemplates !== false ) {
                        $templates = \FormatJson::decode( 
$rowTemplates->templates, true );
@@ -106,7 +106,7 @@
                        return true;
                }
 
-               $db = wfGetDB( DB_SLAVE );
+               $db = wfGetDB( DB_REPLICA );
                $schemaRows = $db->select( self::TABLE_SCHEMA, 
array('template_id','table_schema'), array('template_id'=>$tmp) );
                while ( $row = $schemaRows->fetchObject() ) {
                        self::$loadedRows[$row->template_id] = 
$row->table_schema;
diff --git a/tests/phpunit/StorageWikiPage_Test.php 
b/tests/phpunit/StorageWikiPage_Test.php
index 5c2076f..a2567e5 100644
--- a/tests/phpunit/StorageWikiPage_Test.php
+++ b/tests/phpunit/StorageWikiPage_Test.php
@@ -81,7 +81,7 @@
                $templateStorageTagId = $this->createPage( $titleStorageTag, 
$text, CONTENT_MODEL_WIKITEXT )->getId();
 
                # ------------------------
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = wfGetDB( DB_REPLICA );
                $res = $dbr->select( PhpTagsStorage\Schema::TABLE_SCHEMA, '*', 
array('template_id' => $templateStorageTagId) );
                $n = $res->numRows();
                $res->free();

-- 
To view, visit https://gerrit.wikimedia.org/r/384194
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92f3f29fb9a026a359b4bc00c1f5bc37807aa091
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTagsStorage
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to