Skip to content

Commit 398eda4

Browse files
tarrowAndrewKostka
andauthored
Update to MediaWiki 1.38 (#321)
* First Attempt at 1.38 Image * fix pacman.yaml linting * Run sync again * Update composer * replace patch for Wikibase unit rebuilding code * Include files from patch * fix references to OAuth classes * Remove $wgShellLocale from our LocalSettings.php Bug: T331855 * Switch from using $IP to $wgBaseDirectory Bug: T331855 * Run sync_dist-persist.sh --------- Co-authored-by: Andrew Kostka <andrew.kostka@wikimedia.de> Co-authored-by: Andrew Kostka <3535245+AndrewKostka@users.noreply.github.com>
1 parent 481e0b5 commit 398eda4

10,530 files changed

Lines changed: 728796 additions & 593175 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dist-persist/composer.lock

Lines changed: 1130 additions & 875 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist-persist/wbstack/src/Internal/ApiWbStackElasticSearchInit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ public function mustBePosted() {return true;}
1010
public function isWriteMode() {return true;}
1111
public function isInternal() {return true;}
1212
public function execute() {
13-
global $IP;
13+
global $wgBaseDirectory;
1414

1515
@set_time_limit( 60*5 ); // 5 mins maybe D:
1616
@ini_set( 'memory_limit', '-1' ); // also try to disable the memory limit? Is this even a good idea?
1717
18-
$cmd = 'WBS_DOMAIN=' . $GLOBALS[WBSTACK_INFO_GLOBAL]->requestDomain . ' php ' . $IP . '/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php';
18+
$cmd = 'WBS_DOMAIN=' . $GLOBALS[WBSTACK_INFO_GLOBAL]->requestDomain . ' php ' . $wgBaseDirectory . '/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php';
1919
exec($cmd, $out, $return);
2020

2121
// Return appropriate result

dist-persist/wbstack/src/Internal/ApiWbStackForceSearchIndex.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function mustBePosted() {return true;}
1010
public function isWriteMode() {return true;}
1111
public function isInternal() {return true;}
1212
public function execute() {
13-
global $IP;
13+
global $wgBaseDirectory;
1414

1515
@set_time_limit( 60*5 ); // 5 mins maybe D:
1616
@ini_set( 'memory_limit', '-1' ); // also try to disable the memory limit? Is this even a good idea?
@@ -19,7 +19,7 @@ public function execute() {
1919
$toId = $this->getParameter('toId');
2020

2121
$parameters = "--skipLinks 1 --indexOnSkip 1 --fromId " . escapeshellarg( $fromId ) . " --toId " . escapeshellarg( $toId );
22-
$cmd = 'WBS_DOMAIN=' . $GLOBALS[WBSTACK_INFO_GLOBAL]->requestDomain . ' php ' . $IP . '/extensions/CirrusSearch/maintenance/ForceSearchIndex.php ' . $parameters;
22+
$cmd = 'WBS_DOMAIN=' . $GLOBALS[WBSTACK_INFO_GLOBAL]->requestDomain . ' php ' . $wgBaseDirectory . '/extensions/CirrusSearch/maintenance/ForceSearchIndex.php ' . $parameters;
2323
exec($cmd, $out, $return);
2424

2525
// Return appropriate result

dist-persist/wbstack/src/Internal/ApiWbStackQueueSearchIndexBatches.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ public function mustBePosted() {return true;}
1010
public function isWriteMode() {return true;}
1111
public function isInternal() {return true;}
1212
public function execute() {
13-
global $IP;
13+
global $wgBaseDirectory;
1414

1515
@set_time_limit( 60*5 ); // 5 mins maybe D:
1616
@ini_set( 'memory_limit', '-1' ); // also try to disable the memory limit? Is this even a good idea?
1717
1818
$parameters = "--skipLinks --indexOnSkip --buildChunks 10000";
19-
$cmd = 'WBS_DOMAIN=' . $GLOBALS[WBSTACK_INFO_GLOBAL]->requestDomain . ' php ' . $IP . '/extensions/CirrusSearch/maintenance/ForceSearchIndex.php ' . $parameters . ' 2>&1';
19+
$cmd = 'WBS_DOMAIN=' . $GLOBALS[WBSTACK_INFO_GLOBAL]->requestDomain . ' php ' . $wgBaseDirectory . '/extensions/CirrusSearch/maintenance/ForceSearchIndex.php ' . $parameters . ' 2>&1';
2020
exec($cmd, $out, $return);
2121

2222
// Return appropriate result

dist-persist/wbstack/src/Internal/ApiWbStackSiteStatsUpdate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ public function mustBePosted() {return true;}
1010
public function isWriteMode() {return true;}
1111
public function isInternal() {return true;}
1212
public function execute() {
13-
global $IP;
13+
global $wgBaseDirectory;
1414

1515
@set_time_limit( 60*5 ); // 5 mins maybe D:
1616
@ini_set( 'memory_limit', '-1' ); // also try to disable the memory limit? Is this even a good idea?
1717
18-
$cmd = 'WBS_DOMAIN=' . $GLOBALS[WBSTACK_INFO_GLOBAL]->requestDomain . ' php ' . $IP . '/maintenance/initSiteStats.php --update --active';
18+
$cmd = 'WBS_DOMAIN=' . $GLOBALS[WBSTACK_INFO_GLOBAL]->requestDomain . ' php ' . $wgBaseDirectory . '/maintenance/initSiteStats.php --update --active';
1919
exec($cmd, $out, $return);
2020

2121
// Return appropriate result

dist-persist/wbstack/src/Internal/WbStackPlatformReservedUser.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ public static function createOauthConsumer($consumerName, $version, $grants, $ca
7979
$context = \RequestContext::getMain();
8080
$context->setUser( self::getUser() );
8181

82-
$dbw = \MediaWiki\Extensions\OAuth\Backend\Utils::getCentralDB( DB_MASTER );
83-
$control = new \MediaWiki\Extensions\OAuth\Control\ConsumerSubmitControl( $context, $data, $dbw );
82+
$dbw = \MediaWiki\Extension\OAuth\Backend\Utils::getCentralDB( DB_MASTER );
83+
$control = new \MediaWiki\Extension\OAuth\Control\ConsumerSubmitControl( $context, $data, $dbw );
8484
$status = $control->submit();
8585

8686
if ( !$status->isGood() ) {
@@ -96,7 +96,7 @@ public static function createOauthConsumer($consumerName, $version, $grants, $ca
9696
'reason' => 'Approved by platform',
9797
'changeToken' => $cmr->getChangeToken( $context ),
9898
];
99-
$control = new \MediaWiki\Extensions\OAuth\Control\ConsumerSubmitControl( $context, $data, $dbw );
99+
$control = new \MediaWiki\Extension\OAuth\Control\ConsumerSubmitControl( $context, $data, $dbw );
100100
$approveStatus = $control->submit();
101101

102102
if ( !$approveStatus->isGood() ) {
@@ -116,11 +116,11 @@ public static function getOAuthConsumer($consumerName, $version) {
116116
return false;
117117
}
118118

119-
$db = \MediaWiki\Extensions\OAuth\Backend\Utils::getCentralDB( DB_REPLICA );
119+
$db = \MediaWiki\Extension\OAuth\Backend\Utils::getCentralDB( DB_REPLICA );
120120

121121
// $c is a Consumer
122122
// https://github.com/wikimedia/mediawiki-extensions-OAuth/blob/master/src/Backend/Consumer.php
123-
$c = \MediaWiki\Extensions\OAuth\Backend\Consumer::newFromNameVersionUser(
123+
$c = \MediaWiki\Extension\OAuth\Backend\Consumer::newFromNameVersionUser(
124124
$db,
125125
$consumerName,
126126
$version,
@@ -134,7 +134,7 @@ public static function getOAuthConsumer($consumerName, $version) {
134134
return [
135135
'agent' => $c->getName(),
136136
'consumerKey' => $c->getConsumerKey(),
137-
'consumerSecret' => \MediaWiki\Extensions\OAuth\Backend\Utils::hmacDBSecret( $c->getSecretKey() ),
137+
'consumerSecret' => \MediaWiki\Extension\OAuth\Backend\Utils::hmacDBSecret( $c->getSecretKey() ),
138138
];
139139
}
140140
}

dist-persist/wbstack/src/Settings/LocalSettings.php

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -252,18 +252,10 @@
252252
// TODO sort out directories and stuff...?
253253
// $wgCacheDirectory is needed at least for the l10n rebuild
254254
$wgCacheDirectory = '/tmp/mw-cache';
255-
//$wgUploadDirectory = "{$IP}/images/docker/{$dockerDb}";
255+
//$wgUploadDirectory = "{$wgBaseDirectory}/images/docker/{$dockerDb}";
256256
//$wgUploadPath = "{$wgScriptPath}/images/docker/{$dockerDb}";
257257
//$wgTmpDirectory = "{$wgUploadDirectory}/tmp";
258258

259-
## Locale
260-
/**
261-
* The docker image only has C.UTF-8 currently.
262-
* This is the default for https://www.mediawiki.org/wiki/Manual:$wgShellLocale for core as of 1.30
263-
* But explicitly set it here as it is all the image has!
264-
*/
265-
$wgShellLocale = "C.UTF-8";
266-
267259
#######################################
268260
## --- Default Permissions --- ##
269261
#######################################
@@ -490,10 +482,10 @@ function onPersonalUrlsConfirmAccount( array &$personal_urls, Title $title, Skin
490482
#######################################
491483
## --- Wikibase --- ##
492484
#######################################
493-
wfLoadExtension( 'WikibaseRepository', "$IP/extensions/Wikibase/extension-repo.json" );
494-
require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";
495-
wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
496-
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
485+
wfLoadExtension( 'WikibaseRepository', "$wgBaseDirectory/extensions/Wikibase/extension-repo.json" );
486+
require_once "$wgBaseDirectory/extensions/Wikibase/repo/ExampleSettings.php";
487+
wfLoadExtension( 'WikibaseClient', "$wgBaseDirectory/extensions/Wikibase/extension-client.json" );
488+
require_once "$wgBaseDirectory/extensions/Wikibase/client/ExampleSettings.php";
497489

498490
$wwWikibaseStringLengthString = $wikiInfo->getSetting('wwWikibaseStringLengthMonolingualText');
499491
if($wwWikibaseStringLengthString) {

dist/CREDITS

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{int:version-credits-summary}} <!--
2-
MediaWiki 1.37 is a collaborative project released under the
2+
MediaWiki 1.38 is a collaborative project released under the
33
GNU General Public License v2. We would like to recognize the
44
following names for their contribution to the product.
55

@@ -20,6 +20,7 @@ The following list can be found parsed under Special:Version/Credits -->
2020
* abhinand
2121
* Abhishek Das
2222
* Abián
23+
* Abijeet Patro
2324
* Acamicamacaraca
2425
* Ad Huikeshoven
2526
* Adam Miller
@@ -55,6 +56,7 @@ The following list can be found parsed under Special:Version/Credits -->
5556
* Alexander Sigachov
5657
* Alexander Vorwerk
5758
* Alexandre Emsenhuber
59+
* Alexandros Kosiaris
5860
* Alexia E. Smith
5961
* AlQaholic007
6062
* Amalthea
@@ -122,6 +124,7 @@ The following list can be found parsed under Special:Version/Credits -->
122124
* Bene
123125
* Benny Situ
124126
* Bergi
127+
* Bernard Wang
125128
* Bertrand Grondin
126129
* Bill Pirkle
127130
* Bill Traynor
@@ -161,6 +164,7 @@ The following list can be found parsed under Special:Version/Credits -->
161164
* Chad Horohoe
162165
* Charles Melbye
163166
* Chiefwei
167+
* Chris Danis
164168
* Chris McMahon
165169
* Chris Seaton
166170
* Chris Steipp
@@ -230,13 +234,17 @@ The following list can be found parsed under Special:Version/Credits -->
230234
* Devi Krishnan
231235
* didicodes
232236
* Diederik van Liere
237+
* diesel
233238
* divadsn
234239
* diwanshu885
240+
* Dmitriy Sky
235241
* Domas Mituzas
236242
* Douglas Gardner
237243
* Dov Alperin
238244
* DPStokesNZ
239245
* dr0ptp4kt
246+
* drynok
247+
* dylsss
240248
* Ebrahim Byagowi
241249
* Ed Sanders
242250
* Ed Schouten
@@ -342,6 +350,7 @@ The following list can be found parsed under Special:Version/Credits -->
342350
* Inez Korczyński
343351
* IoannisKydonis
344352
* Ireas
353+
* Isabelle Hurbain-Palatin
345354
* isarra
346355
* Itamar Givon
347356
* Ivan Lanin
@@ -406,6 +415,7 @@ The following list can be found parsed under Special:Version/Credits -->
406415
* Jonathan
407416
* Jonathan Wiltshire
408417
* Jools Wills
418+
* joseph emmanuel kayode (iemarjay)
409419
* jsahleen
410420
* Juan Osorio
411421
* Julian Ostrow
@@ -431,6 +441,7 @@ The following list can be found parsed under Special:Version/Credits -->
431441
* Kim Hyun-Joon
432442
* kipod
433443
* kishanio
444+
* KleinMuci
434445
* konarak
435446
* Kosta Harlan
436447
* krishna keshav
@@ -532,6 +543,7 @@ The following list can be found parsed under Special:Version/Credits -->
532543
* Max Semenik
533544
* Max Sikström
534545
* mayankmadan
546+
* mbsantos
535547
* mech
536548
* Mehmet Mert Yıldıran
537549
* Melos
@@ -625,6 +637,7 @@ The following list can be found parsed under Special:Version/Credits -->
625637
* opatel99
626638
* Oren Held
627639
* Ori Livneh
640+
* osamaahmed17
628641
* oskar.jauch@gmail.com
629642
* Ostrzyciel
630643
* Ottomata
@@ -742,6 +755,7 @@ The following list can be found parsed under Special:Version/Credits -->
742755
* Sam Smith
743756
* Sam Wilson
744757
* SamanthaNguyen
758+
* Samuel Guebo
745759
* Samuel Hilson
746760
* Santhosh Thottingal
747761
* saptaks
@@ -772,11 +786,13 @@ The following list can be found parsed under Special:Version/Credits -->
772786
* shirayuki
773787
* Shreyas Minocha
774788
* shubham656
789+
* Siddharth VP
775790
* Sidhant Gupta
776791
* Siebrand Mazeland
777792
* Simeon Dahl
778793
* Simon Legner
779794
* Simon Walker
795+
* Simone This Dot
780796
* Smriti Singh
781797
* Sohom Datta
782798
* Solitarius
@@ -787,6 +803,7 @@ The following list can be found parsed under Special:Version/Credits -->
787803
* Srđan
788804
* Srikanth Lakshmanan
789805
* ST47
806+
* stang
790807
* Stanislav Malyshev
791808
* Stefano Codari
792809
* Steinsplitter
@@ -843,6 +860,7 @@ The following list can be found parsed under Special:Version/Credits -->
843860
* tjlsangria
844861
* Tjones
845862
* TK-999
863+
* Tks4Fish
846864
* Tobi_406
847865
* Tobias Gritschacher
848866
* Tom Arrow
@@ -855,6 +873,7 @@ The following list can be found parsed under Special:Version/Credits -->
855873
* Toni Hermoso Pulido
856874
* Tony Thomas
857875
* Tpt
876+
* Tranve
858877
* Trevor Parscal
859878
* Trey Jones
860879
* tsepothoabala
@@ -895,9 +914,12 @@ The following list can be found parsed under Special:Version/Credits -->
895914
* wikitrent
896915
* Wil Mahan
897916
* William Demchick
917+
* Winston Sung
898918
* withoutaname
899919
* WMDE-Fisch
900920
* X!
921+
* xiplus
922+
* xover
901923
* XP1
902924
* Yaron Koren
903925
* Yaroslav Melnychuk

0 commit comments

Comments
 (0)