jenkins-bot has submitted this change and it was merged.

Change subject: Configure UrlShortener extension in read-only mode
......................................................................


Configure UrlShortener extension in read-only mode

Bug: T108557
Change-Id: I78b69b37732925f7a04c782c26e5b4c5bdf12fcb
---
M wmf-config/CommonSettings-labs.php
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
3 files changed, 44 insertions(+), 2 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 1ab1f79..d91a627 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -151,9 +151,10 @@
 }
 
 if ( $wmgUseUrlShortener ) {
-       wfLoadExtension( 'UrlShortener' );
-       $wgUrlShortenerTemplate = '/$1';
+       // Labs overrides
+       $wgUrlShortenerReadOnly = false;
        $wgUrlShortenerServer = 'w-beta.wmflabs.org';
+       $wgUrlShortenerDBCluster = false;
        $wgUrlShortenerDBName = 'wikishared';
        $wgUrlShortenerDomainsWhitelist = array(
                '(.*\.)?wikipedia\.beta\.wmflabs\.org',
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 549e1a5..b2b8748 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -814,6 +814,40 @@
        $wgFFmpegLocation = '/usr/bin/ffmpeg';
 }
 
+if ( $wmgUseUrlShortener ) {
+       wfLoadExtension( 'UrlShortener' );
+       $wgUrlShortenerTemplate = '/$1';
+       $wgUrlShortenerServer = 'w.wiki';
+       $wgUrlShortenerDBCluster = 'extension1';
+       $wgUrlShortenerDBName = 'wikishared';
+       $wgUrlShortenerDomainsWhitelist = array(
+               '(.*\.)?wikipedia\.org',
+               '(.*\.)?wiktionary\.org',
+               '(.*\.)?wikibooks\.org',
+               '(.*\.)?wikinews\.org',
+               '(.*\.)?wikiquote\.org',
+               '(.*\.)?wikisource\.org',
+               '(.*\.)?wikiversity\.org',
+               '(.*\.)?wikivoyage\.org',
+               '(.*\.)?wikimedia\.org',
+               'wikidata\.org',
+       );
+       $wgUrlShortenerApprovedDomains = array(
+               '*.wikipedia.org',
+               '*.wiktionary.org',
+               '*.wikibooks.org',
+               '*.wikinews.org',
+               '*.wikiquote.org',
+               '*.wikisource.org',
+               '*.wikiversity.org',
+               '*.wikivoyage.org',
+               '*.wikimedia.org',
+               'wikidata.org',
+       );
+       $wgUrlShortenerReadOnly = true;
+}
+
+
 if ( $wmgPFEnableStringFunctions ) {
        $wgPFEnableStringFunctions = true;
 }
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 0381e6e..77356c2 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12345,6 +12345,13 @@
        'default' => 800,
 ),
 
+'wmgUseUrlShortener' => array(
+       'default' => true,
+       'private' => false,
+       'loginwiki' => false,
+       'votewiki' => false,
+),
+
 'wgAllowMicrodataAttributes' => array(
        'default' => false,
        'hewikisource' => true, // T89655

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I78b69b37732925f7a04c782c26e5b4c5bdf12fcb
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to