Awight has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/196985

Change subject: Default to single-database configuration
......................................................................

Default to single-database configuration

This is the correct assumption for most development, testing, and small wikis.

Note that this creates some dead code, which handled a theoretical multiwiki
arrangement where we don't have direct access to the CN infrastructure DB, see
$wgCentralNoticeApiUrl for more details.

Bug: T91763
Change-Id: I2aa2c994034aaa665757554b6eb0503171dfe709
---
M CentralNotice.hooks.php
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/85/196985/1

diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index 12860a2..2e9a1e8 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -38,7 +38,7 @@
        global $wgHooks, $wgNoticeInfrastructure, $wgAutoloadClasses, 
$wgSpecialPages,
                   $wgCentralNoticeLoader, $wgSpecialPageGroups, 
$wgCentralPagePath, $wgScript,
                   $wgNoticeUseTranslateExtension, $wgAPIModules, 
$wgAPIListModules,
-                  $wgAvailableRights, $wgGroupPermissions;
+                  $wgAvailableRights, $wgGroupPermissions, $wgCentralDBname, 
$wgDBname;
 
        // If $wgCentralPagePath hasn't been set, set it to the local script 
path.
        // We do this here since $wgScript isn't set until after 
LocalSettings.php loads.
@@ -46,6 +46,11 @@
                $wgCentralPagePath = $wgScript;
        }
 
+       // Default for a standalone wiki is that the CN tables are in the main 
database.
+       if ( $wgCentralDBname === false ) {
+               $wgCentralDBname = $wgDBname;
+       }
+
        $dir = __DIR__ . '/';
        $specialDir = $dir . 'special/';
        $apiDir = $dir . 'api/';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2aa2c994034aaa665757554b6eb0503171dfe709
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>

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

Reply via email to