jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/378890 )

Change subject: Swap DB_SLAVE to DB_REPLICA, rm old PHP entry point since 
DB_REPLICA explicitly requires MW 1.27 or newer
......................................................................


Swap DB_SLAVE to DB_REPLICA, rm old PHP entry point since DB_REPLICA explicitly 
requires MW 1.27 or newer

Updated the README file accordingly, too.

Change-Id: I9276d4f3a6593d8176672a555941610d406e46a6
---
M README
M RandomImage.class.php
D RandomImage.php
M extension.json
4 files changed, 8 insertions(+), 27 deletions(-)

Approvals:
  Jack Phoenix: Looks good to me, approved
  SamanthaNguyen: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Samwilson: Looks good to me, but someone else must approve



diff --git a/README b/README
index 9ce5e6a..8f0ef09 100644
--- a/README
+++ b/README
@@ -19,7 +19,7 @@
 
 == Requirements ==
 
-This version of the RandomImage extension requires MediaWiki 1.25.0 or above.
+This version of the RandomImage extension requires MediaWiki 1.27.0 or above.
 
 == Installation ==
 
@@ -88,6 +88,11 @@
 overhead on pageviews.
 
 == Change log ==
+19 September 2017
+Version 1.5.1
+       Deprecated DB_SLAVE constant changed to DB_REPLICA, thus at least 
MediaWiki
+       1.27 or newer is required.
+
 10 June 2017
 Version 1.5
        Added version number to the extension credits displayed on 
Special:Version
diff --git a/RandomImage.class.php b/RandomImage.class.php
index ec81113..579cd31 100644
--- a/RandomImage.class.php
+++ b/RandomImage.class.php
@@ -190,7 +190,7 @@
         * @return Title
         */
        protected function pickFromDatabase() {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = wfGetDB( DB_REPLICA );
                list( $table, $conds, $opts ) = $this->getExtraSelectOptions( 
$dbr );
                $res = $dbr->select(
                        $table,
diff --git a/RandomImage.php b/RandomImage.php
deleted file mode 100644
index 54e16d5..0000000
--- a/RandomImage.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-/**
- * Parser hook extension to add a <randomimage> tag
- *
- * @file
- * @ingroup Extensions
- * @author Rob Church <[email protected]>
- * @copyright © 2006 Rob Church
- * @licence GNU General Public Licence 2.0
- */
-
-if ( function_exists( 'wfLoadExtension' ) ) {
-       wfLoadExtension( 'RandomImage' );
-       // Keep i18n globals so mergeMessageFileList.php doesn't break
-       $wgMessagesDirs['RandomImage'] = __DIR__ . '/i18n';
-       wfWarn(
-               'Deprecated PHP entry point used for RandomImage extension. ' .
-               'Please use wfLoadExtension instead, ' .
-               'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-       );
-       return;
-} else {
-       die( 'This version of the RandomImage extension requires MediaWiki 
1.25+' );
-}
\ No newline at end of file
diff --git a/extension.json b/extension.json
index b25f6bc..52a3b74 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
        "name": "RandomImage",
-       "version": "1.5",
+       "version": "1.5.1",
        "author": [
                "Rob Church"
        ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9276d4f3a6593d8176672a555941610d406e46a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RandomImage
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: SamanthaNguyen <[email protected]>
Gerrit-Reviewer: Samwilson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to