Commit graph

3336 commits

Author SHA1 Message Date
jenkins-bot
ad68acdcb1 Merge "Add Vue.js library (v2.6.11)" 2020-02-06 00:15:21 +00:00
Reedy
ea64ac836f Consistently use $ when referencing $wg in comments
Change-Id: Ibba98817221e22ecf0eb9822a954d48d2cf99622
2020-02-05 18:18:02 +00:00
jenkins-bot
8d1a7b906e Merge "Deprecate access of logos directly from config, introduce wgLogos" 2020-02-05 02:09:32 +00:00
Timo Tijhof
bc1f601382 docs: Improve "Entry points" documentation page
Turn this into a doc group, and let the descriptions come
directly from the files in question. This makes the list easier
to maintain, and alsom means that the overview page becomes
discoverable whenever one is looking at the entry point file
as well. Previously the doc page pointed to the entry points,
but not the other way around. This is also fixed.

Bug: T244294
Change-Id: I891c5a37e17592edc1136d7367949927121c8bc8
2020-02-04 21:44:38 +00:00
jdlrobson
8cd2e13363 Deprecate access of logos directly from config, introduce wgLogos
Add getAvailableLogos static method and wgLogos config variable

Longterm we'll phase out wgLogo and wgLogoHD for this more extendable
config.

wgLogoHD is marked as deprecated. wgLogo continues to function as before
when wgLogos doesn't exist to cause minimum disruption.

From now on all logos should be accessed via getAvailableLogos. Patches
in Minerva and Vector follow. See I00899c16c0325f36b671baf17e88c2b5187b3526,
I569e0d800e147eabc7852567acd140108613f074 and
I013bd0904fe8c55efa49d14e84cf06ec1412896f.

Bug: T232140
Change-Id: I66a971631c623cc94b58eb0e5e5bad804789bf1c
2020-02-04 01:56:20 +00:00
Roan Kattouw
4c221a1ea5 Add Vue.js library (v2.6.11)
Uses the development build of Vue in debug mode or when
$wgVueDevelopmentMode = true , and the production mode otherwise.

Change-Id: I2ab1f6364a302c0d1dbbd4c01967028c2e08082b
2020-02-03 16:42:37 -08:00
Aaron Schulz
758e980427 objectcache: remove APCBagOStuff class
apcu comes with PHP 5.5+ and the minimum version for MediaWiki is 7.2

Change-Id: I69a988c6c2999766a3c7e56b841cd4f4091b4d95
2020-01-29 17:27:47 +00:00
C. Scott Ananian
e149a38d4f Remove $wgMaxGeneratedPPNodeCount
This no longer has any effect.  The getter and setter in ParserOptions
aren't used in any public git code, and so have been removed without
deprecation.

Bug: T204945
Followup-To: I727f003f9a42d0c92bcbcce8a8289d5af6cd1298
Change-Id: Id48effcba48d1ae1621a4e17a70e65b73f2473b7
2020-01-28 16:54:53 -05:00
C. Scott Ananian
0eb9f18d8d Remove all traces of preprocessorClass from $wgParserConf
Bug: T204945
Followup-To: I727f003f9a42d0c92bcbcce8a8289d5af6cd1298
Change-Id: I23821686ad666728d7d196e089f40be4b76b7390
2020-01-25 13:15:16 -05:00
C. Scott Ananian
5cbb64f56a Remove Preprocessor_DOM, deprecated in 1.34
Remove the deprecated Preprocessor_DOM class, which was hard-deprecated
in 1.34.  This begins to simplify parser configuration and reduce redundant
code paths, but I've left two things for cleanup in a future patch:

1. The `preprocessorClass` configuration option to the parser, exposed
in `$wgParserConf`, ServiceWiring, ParserFactory, etc.  There is no reason
for this to be exposed as configurable, but I've left this clean up to a
future patch.

2. The `$wgMaxGeneratedPPNodeCount` configuration, exposed also in
ParserOptions.  Only Preprocessor_DOM calculated this count, and since
we are only using Preprocessor_Hash now, this configuration has no effect.
But since this value was exposed in ParserOptions and elsewhere, I've
deprecated where needed but left this clean up to a future patch.

Bug: T204945
Change-Id: I727f003f9a42d0c92bcbcce8a8289d5af6cd1298
2020-01-25 11:22:45 -05:00
sbassett
b86c6751d0 Password policy to check if a password is a substring of a username
Similar to checkPasswordCannotMatchUsername, MediaWiki should ensure
that users are unable to accidentally create or edit their username
to include their password as a substring of said username.

Bug: T241845
Change-Id: I437e91a5b83a792c5ad31e291915491bbb382dfa
2020-01-13 23:09:13 +00:00
James D. Forrester
41f8acfd52 Coding style: Auto-fix MediaWiki.Commenting.DocComment.*
Change-Id: Iea5a07e10712723970a15008eb367e0af226fcc3
2020-01-10 12:28:12 -08:00
DannyS712
d50b9592e2 Drop wgSkipSkin, deprecated and unused
Bug: T241342
Change-Id: I38708089a48979dc9816a16050e48ed0c8a7b572
2020-01-02 00:37:48 +01:00
DannyS712
049dd15d4c Drop wgProfileOnly, deprecated and unused
Bug: T241343
Change-Id: I16eed6807bdcae657153221d06c4448da4566371
2019-12-23 00:48:53 +00:00
DannyS712
f55e279d8f Follow-up 94582698c3: Fix references to injection.txt, now Injection.md
Change-Id: Ia7e653e0af0aca527e3e7c7625b669a10fc6d500
2019-12-14 20:19:56 +00:00
Timo Tijhof
15dbbe324c API: Deprecate wgEnableOpenSearchSuggest and opensearch+suggest parameter
The OpenSearch and prefixsearch APIs are always on for external use.

This internal parameter and feature flag was used as emergency switch
when the feature was still new, as a way to selectively ignore queries
from our own frontend code if we decided to turn the feature off.

At the time, there was also the $wgEnableMWSuggest configuration variable.
The idea being that if the JS is undeployed, it may still be cached in the
HTML and in some browsers. The $wgEnableOpenSearchSuggest variable allowed
the MW servers to identify those requests and return empty array without
any further DB load. Thus returning an empty array, which the frontend
at the time (mwsuggest.js) treated the same way visually as if the suggestion
feature didn't exist.

Since then:
* $wgEnableMWSuggest was removed in MediaWiki 1.20. The search suggestions
  in Vector and other skins are now always on.
* The "Disable search suggestions" user preference was removed
  in MediaWiki 1.23 (T54812).

Proposing to remove this additional complexity.

Change-Id: Iec572012de171d02871b8dc3207d2b34d17bf9ef
2019-12-13 18:11:43 +00:00
jenkins-bot
8d7c1516c8 Merge "Set MCR migration stage to SCHEMA_COMPAT_NEW." 2019-11-18 15:56:54 +00:00
daniel
1a917bab4c Set MCR migration stage to SCHEMA_COMPAT_NEW.
This disables writing to the old schema in DefaultSettings.php.

Bug: T231673
Change-Id: I799bfb76c10fd0c0dc791e7380fce0159d81c2d3
2019-11-18 15:25:39 +00:00
jenkins-bot
f5a708da3b Merge "Remove $wgDBWindowsAuthentication" 2019-11-10 15:47:17 +00:00
mainframe98
1aa6cdab0e Remove $wgDBWindowsAuthentication
Follow up to 807d793, this setting is unused.

Bug: T230418
Change-Id: I3e27af725ec2f8f206e068f140a9cfdaafa523c7
2019-11-10 16:00:43 +01:00
Ammar Abdulhamid
4d55fa08dd Remove jquery.tabIndex module
This module was deprecated in I8e1b43a

Bug: T234581
Change-Id: I67998a0b2f49dfeb7921b6fae08b380a68c7674d
2019-11-08 17:56:19 +00:00
Fomafix
b14faae85b Use @since 1.35 instead of @since 1.34 for wgInterlanguageLinkCodeMap
This is a followup to change c919b04f53.

Change-Id: I701a41cf854b4f2ad6312fec1e01c80b341ffe81
2019-11-08 11:49:46 +01:00
Niklas Laxström
c919b04f53 Add $wgInterlanguageLinkCodeMap
This allows us to use correct names in Names.php without needing to
change the domain codes.

Bug: T174160
Change-Id: I98d2b453022f2de8a32b5d55bac91f3c317e4310
2019-11-07 08:27:36 +00:00
Timo Tijhof
0da1ecfd89 profiler: Remove ProfilerOutputDb and profileinfo.php entry point
Bug: T231366
Change-Id: I211c8192200d9af00914f9847608a6daf2898f91
2019-11-06 15:28:00 -05:00
Cormac Parle
c4eae0dad4 Search: Provide new preference to control redirects on search matches
To avoid preference bloat, this preference is hidden unless the new
sysadmin config $wgSearchMatchRedirectPreference is set.

Bug: T235263
Change-Id: Ic16f53a4e6ddb6da071d63cd5da28d937d4692c8
2019-11-06 15:37:56 +00:00
Brad Jorsch
f3058c81b9 Add $wgDiffEngine
The immediate use case is for testing, where some tests need to use the
PHP implementation even when wikidiff2 is installed.

Bug: T237049
Change-Id: I41dc4c0933429065d7638f518ec31f0a056afc41
2019-11-05 10:38:52 -05:00
DannyS712
ce99c5f3aa Remove $wgSysopEmailBans, deprecated in 1.34
Bug: T233116
Change-Id: I72e257454692b29bfcbf4796f457858fc61b93d8
2019-11-01 02:46:45 +00:00
Kunal Mehta
03078991c4 Disable $wgServer autodetection to prevent cache poisoning attacks
Since MediaWiki 1.18, $wgServer has been automatically set by the web installer
when it generates LocalSettings.php, so this shouldn't be an issue for most
wikis. The CLI installer now supports a --server optional parameter to
specify $wgServer, otherwise it'll be set to 'http://localhost' by default.

Users will see a fatal error pointing them to the on-wiki $wgServer
documentation that I've updated as well.

Originally this functionality was slated for removal in 1.20, but now is
just a good time as any. It also calls into other parts of MediaWiki before
most things are initialized, making it difficult to librarize some code.

Bug: T30798
Bug: T232931
Change-Id: Ia5d616e7fafbab01655067c24c5a3a073b254f21
2019-10-30 15:49:41 +11:00
jenkins-bot
27f3609127 Merge "Document wgEnablePartialBlocks usage in a SiteConfiguration object" 2019-10-29 20:00:53 +00:00
jenkins-bot
1c6263f49d Merge "Remove deprecated wikidiff2 configuration" 2019-10-22 12:04:58 +00:00
Ammar Abdulhamid
0454b34c4d resourceloader: Simplify $wgResourceLoaderMaxage config
Remove support for the 'client' and 'server' subkeys.

Bug: T235314
Change-Id: Ibeb2404b0f7dc8a9198e73344d54a3cb0176de08
2019-10-19 21:28:58 +01:00
jenkins-bot
4b6468ba66 Merge "rdbms: Restore debug toolbar "Queries" feature" 2019-10-15 18:29:02 +00:00
David Barratt
8d195b08df
Document wgEnablePartialBlocks usage in a SiteConfiguration object
When used in a SiteConfiguration object, the wgEnablePartialBlocks cannot
be used with a suffix or a tag.

Change-Id: I5e8c5087bb4d279051f429a4b99ed7c46e0bc85c
2019-10-11 16:56:06 -04:00
Timo Tijhof
2e404a2582 rdbms: Restore debug toolbar "Queries" feature
This broke after e0cc49ce39, due to the field 'master'
being removed from the log context. The LegacyLogger logic
forwarding these messages to MWDebug (for the debug toolbar)
however, was dependant on.

Users of debug toolbar experienced a silent failure because the
logic in question is very tolerant of missing fields. This is
because it uses those fields to distinguish the 'sql' messages
from channel=DBQuery from other messages in the same channel.
Making that less fragile is outside the scope of this commit.

This commit:

* Restore the basic functionality by making sure MWDebug::query()
  gets called again for DBQuery messages.

* Remove the code relating to the 'master' field as this no longer
  exists in RDBMS. It also wasn't used anywhere (to be used,
  it would need to be read by mediawiki.debug/debug.js).

* Remove unexpanded "{method}" and "{runtime}" noise in the debug
  toolbar text. This was introduced by he conversion to PSR-3
  logging.. These fields are already rendered separately by
  the toolbar and should not be part of the "SQL" column.
  To do this, we need to log the $sql bit as its own key, so
  I've made this a context field as well.

* Reduce the condition logic in LegacyLogger to only looking for
  'DBQuery' and 'sql'. This way, if it breaks again it will
  still call the logic within and emit E_NOTICE instead, which
  would help detect the issue (and still fallback to at least
  showing the queries). Unlike before this commit where it took
  quite some time to figure out why it wasn't working.

* The above fixes still weren't enough to get queries to show
  up in the Debug toolbar for me. Turns out, this was because
  my local setup (mediawiki-docker-dev) uses a master-replica
  set up. The setup doesn't use any custom LBFactory config,
  just plain $wgDBservers. The logic for turning these plain
  settings into LBFactory (in MWLBFactory.php) does kick in,
  and does run (unlike if I had custom wgLBFactoryConf).
  But, the DBO_DEBUG flag didn't make it through because of
  the += operator preferring any pre-existing value my setup
  has, which is just `DBO_DEFAULT`.
  Merging 'flags' keys seems unsafe in general, but adding
  DBO_DEBUG based on $wgDebugDumpSql seems innocent and doesn't
  affect other behaviour (it's a case of DWIM).

Bug: T231742
Change-Id: I122bb1a65620a7ae4e1943136c975b63524a5111
2019-10-11 20:04:05 +01:00
Adam Wight
87f0f1d88a Remove deprecated wikidiff2 configuration
Migration instructions were already included in RELEASE-NOTES-1.34

Bug: T194272
Change-Id: I7f8cca7617b764eede0435c0384ee70d4933cfb7
2019-10-09 15:57:56 +02:00
jenkins-bot
cefd7c922f Merge "Session: Remove mcrypt support, dropped from PHP 7.2" 2019-10-08 04:03:46 +00:00
Max Semenik
2816b4f7da Session: Remove mcrypt support, dropped from PHP 7.2
Change-Id: I46d04f4b31730ee1b368f2c2646638fa59234f66
2019-10-07 16:15:15 -07:00
Aryeh Gregor
043d88f680 Make LocalisationCache a service
This removes Language::$dataCache without deprecation, because 1) I
don't know of a way to properly simulate it in the new paradigm, and 2)
I found no direct access to the member outside of the Language and
LanguageTest classes.

An earlier version of this patch (e4468a1d6b) had to be reverted
because of a massive slowdown on test runs. Based on some local testing,
this should fix the problem. Running all tests in languages is slowed
down by only around 20% instead of a factor of five, and memory usage is
actually reduced greatly (~350 MB -> ~200 MB). The slowdown is still not
great, but I assume it's par for the course for converting things to
services and is acceptable. If not, I can try to optimize further.

Bug: T231220
Bug: T231198
Bug: T231200
Bug: T201405
Change-Id: Ieadbd820379a006d8ad2d2e4a1e96241e172ec5a
2019-10-07 13:18:47 -07:00
Lucas Werkmeister
61c70d2de3 Fix documentation of $wgMainStash option
'db' is not a valid value:

> UnexpectedValueException: Cache type "db" is not present in $wgObjectCaches. in /var/www/html/wiki1/includes/ServiceWiring.php on line 318

Instead, one of the cache types set up in $wgObjectCaches must be used.

Change-Id: Id2cdf1f42dc552d21871af73abf8e87d0585706e
2019-10-07 20:08:51 +02:00
Max Semenik
06a275f48e Remove more HHVM hacks
Change-Id: I6bd298ef3b887173b87004ee055be2a4f6ea5f11
2019-10-06 10:16:09 +00:00
jenkins-bot
ec440ce1bf Merge "Make max-age configurable for logged-out users" 2019-10-03 22:13:50 +00:00
Gilles Dubuc
ea9cb5ceaa Make max-age configurable for logged-out users
For small wikis. When a CDN is present, the value is
overwritten by the CDN.

Bug: T231184
Change-Id: I45a53571d0f5f6316eb97b396c18c0b224586526
2019-10-03 21:59:10 +00:00
James D. Forrester
23eaa5aa95 Prepare for REL1_34 cut, labelling master as 1.35-alpha
Change-Id: Iae024da81a3808a58e17af2278e104abbcd3dd1e
2019-09-30 10:19:58 -07:00
Umherirrender
9a8a33bd0f Add a run mode to $wgDisableQueryPageUpdate
The run mode is used to show a different message on the special page,
instead of the current one "Updates for this page are currently
disabled. Data here will not presently be refreshed." even the data gets
updated with a different cron job.

Bug: T78711
Change-Id: Ib63d16bfea477dec43323b39671cc068530e2f0b
2019-09-26 22:33:53 +00:00
Niklas Laxström
2830ba4499 Mark $wgMainPageIsDomainRoot as experimental
Change-Id: I328c1022aec8918cbc5b4ee50de3d1dbe5586cfd
2019-09-24 08:53:19 +02:00
jenkins-bot
9e8439e79d Merge "Add config for serving main Page from the domain root" 2019-09-23 15:28:03 +00:00
Amir Sarabadani
a5deeac58c Add config for serving main Page from the domain root
Bug: T120085
Change-Id: If2d82340ec58888a0bac96924ab63456b6d480fb
2019-09-23 11:55:59 +02:00
Thalia
ca7869174f Improve documentation for the MinimumPasswordLengthToLogin policy
Bug: T233119
Change-Id: I2d0fa6f7116b407cbf62ad93da73d0800c9d14f9
2019-09-17 20:41:23 +01:00
DannyS712
3a2c7d1b5d Deprecate $wgSysopEmailBans
Bug: T232169
Change-Id: Iba2493eb2f49d32c5aa1b4da53c9c221847fb125
2019-09-17 08:23:04 +00:00
Thalia
043e1d2dbe Update old URLs in DefaultSettings related to Squid caching
Change-Id: Ic94fd638a80fcdc74f42c726f2e2e256b8f0c04d
2019-09-14 22:40:33 +01:00