Umherirrender has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/394658 )
Change subject: DB_SLAVE -> DB_REPLICA
......................................................................
DB_SLAVE -> DB_REPLICA
Extension already required 1.27
Change-Id: I34f1aaf00cca167efd3e913e004bd68cb0da251a
---
M includes/PF_AutocompleteAPI.php
M includes/PF_FormEditAction.php
M includes/PF_FormLinker.php
M includes/PF_Utils.php
M includes/PF_ValuesUtils.php
M includes/forminputs/PF_Tree.php
M specials/PF_CreateForm.php
7 files changed, 10 insertions(+), 10 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms
refs/changes/58/394658/1
diff --git a/includes/PF_AutocompleteAPI.php b/includes/PF_AutocompleteAPI.php
index b57bd77..ff5501a 100644
--- a/includes/PF_AutocompleteAPI.php
+++ b/includes/PF_AutocompleteAPI.php
@@ -187,7 +187,7 @@
global $smwgDefaultStore;
$values = array();
- $db = wfGetDB( DB_SLAVE );
+ $db = wfGetDB( DB_REPLICA );
$sqlOptions = array();
$sqlOptions['LIMIT'] = $wgPageFormsMaxAutocompleteValues;
diff --git a/includes/PF_FormEditAction.php b/includes/PF_FormEditAction.php
index 9d6f93e..c68d566 100644
--- a/includes/PF_FormEditAction.php
+++ b/includes/PF_FormEditAction.php
@@ -225,7 +225,7 @@
* (hopefully) pretty rare.
*/
static function getNumPagesPerForm() {
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select(
array( 'category', 'page', 'page_props' ),
array( 'pp_value', 'SUM(cat_pages) AS total_pages' ),
diff --git a/includes/PF_FormLinker.php b/includes/PF_FormLinker.php
index 8f6a731..a25bb53 100644
--- a/includes/PF_FormLinker.php
+++ b/includes/PF_FormLinker.php
@@ -21,7 +21,7 @@
}
$pageID = $title->getArticleID();
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select( 'page_props',
array(
'pp_value'
diff --git a/includes/PF_Utils.php b/includes/PF_Utils.php
index 81b6c5f..00574f7 100644
--- a/includes/PF_Utils.php
+++ b/includes/PF_Utils.php
@@ -234,7 +234,7 @@
* Returns an array of all form names on this wiki.
*/
public static function getAllForms() {
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select( 'page',
'page_title',
array( 'page_namespace' => PF_NS_FORM,
diff --git a/includes/PF_ValuesUtils.php b/includes/PF_ValuesUtils.php
index e806a4b..a6cb598 100644
--- a/includes/PF_ValuesUtils.php
+++ b/includes/PF_ValuesUtils.php
@@ -51,7 +51,7 @@
*/
public static function getCategoriesForPage( $title = null ) {
$categories = array();
- $db = wfGetDB( DB_SLAVE );
+ $db = wfGetDB( DB_REPLICA );
$conditions = null;
if ( !is_null( $title ) ) {
$titlekey = $title->getArticleID();
@@ -149,7 +149,7 @@
}
global $wgPageFormsMaxAutocompleteValues,
$wgPageFormsUseDisplayTitle;
- $db = wfGetDB( DB_SLAVE );
+ $db = wfGetDB( DB_REPLICA );
$top_category = str_replace( ' ', '_', $top_category );
$categories = array( $top_category );
$checkcategories = array( $top_category );
@@ -392,7 +392,7 @@
return wfMessage( 'pf-missingnamespace',
wfEscapeWikiText( $namespace_name ) );
}
- $db = wfGetDB( DB_SLAVE );
+ $db = wfGetDB( DB_REPLICA );
$tables = array( 'page' );
$columns = array( 'page_title' );
$conditions = array();
@@ -540,7 +540,7 @@
public static function getSQLConditionForAutocompleteInColumn( $column,
$substring, $replaceSpaces = true ) {
global $wgDBtype, $wgPageFormsAutocompleteOnAllChars;
- $db = wfGetDB( DB_SLAVE );
+ $db = wfGetDB( DB_REPLICA );
// CONVERT() is also supported in PostgreSQL, but it doesn't
// seem to work the same way.
diff --git a/includes/forminputs/PF_Tree.php b/includes/forminputs/PF_Tree.php
index aae7e64..c29378a 100644
--- a/includes/forminputs/PF_Tree.php
+++ b/includes/forminputs/PF_Tree.php
@@ -85,7 +85,7 @@
* @return array
*/
private static function getSubcategories( $categoryName ) {
- $dbr = wfGetDb( DB_SLAVE );
+ $dbr = wfGetDb( DB_REPLICA );
$tables = array( 'page', 'categorylinks' );
$fields = array( 'page_id', 'page_namespace', 'page_title',
diff --git a/specials/PF_CreateForm.php b/specials/PF_CreateForm.php
index 6e63f34..1c8fa5b 100644
--- a/specials/PF_CreateForm.php
+++ b/specials/PF_CreateForm.php
@@ -56,7 +56,7 @@
function doSpecialCreateForm( $query ) {
$out = $this->getOutput();
$req = $this->getRequest();
- $db = wfGetDB( DB_SLAVE );
+ $db = wfGetDB( DB_REPLICA );
if ( !is_null( $query ) ) {
$presetFormName = str_replace( '_', ' ', $query );
--
To view, visit https://gerrit.wikimedia.org/r/394658
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I34f1aaf00cca167efd3e913e004bd68cb0da251a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits