Commit graph

3106 commits

Author SHA1 Message Date
jenkins-bot
6d4f11c2e3 Merge "Use binary charset in default table options" 2018-09-24 22:12:55 +00:00
jenkins-bot
cf0f32f778 Merge "Provide a way to restore an old revision with multiple slots." 2018-09-24 19:36:32 +00:00
daniel
9da12daf46 Provide a way to restore an old revision with multiple slots.
Bug: T204732
Change-Id: I0ea2711e68c78465a5e5cfaa0181ad5ce983d35a
2018-09-24 19:46:30 +02:00
Reedy
6aaaa070f3 Remove MimeMagic
Deprecated since 1.28

Change-Id: I793deb8669e353525464ccd840801e5015c545c8
2018-09-23 20:13:29 +00:00
C. Scott Ananian
7b23382823 Soft deprecate non-Remex tidy configurations
Future parsers will not be able to emit output compatible with these
configurations.

Bug: T198214
Change-Id: Id7921a166a62457f289e6c0c4bba6c8563be4760
2018-09-20 15:10:44 +00:00
C. Scott Ananian
6f8431c4f5 Hard-deprecate the $wgUseTidy option
This has been soft-deprecated since MW 1.26; this hard-deprecation
sets the stage for future removal of this old cruft.

Bug: T198214
Depends-On: Idf246d05d116f63a73105b50a1929a7721fbe7b9
Change-Id: I2e7d990da1da378eb6e828d4b3c0f5a41791dd92
2018-09-20 11:08:40 -04:00
Tim Starling
9bea45eab7 Use binary charset in default table options
$wgDBTableOptions is overridden in the installer-generated
LocalSettings.php, and is always set to binary now that the installer UI
option has been removed. However, the value from DefaultSettings.php is
used when the installer installs an extension, since in this case
DatabaseUpdater is called without reading the generated
LocalSettings.php.

Binary is almost certainly the right answer since many extensions can't
even be installed without this option, they hit a key length error.

Change-Id: I87df736a4d9e49c9535d55bd556e636500ca203f
2018-09-19 15:56:10 +10:00
James D. Forrester
8fb62951f1 Special:Preferences: Enable OOUI mode by default
Developers and other users can temporarily still opt out with ?ooui=0.

Bug: T117781
Change-Id: I1466e67161b5155552ffa7d80c383064913ec4dc
2018-09-18 11:29:38 -07:00
daniel
d6b989b550 Use "Unknown user" instead of an empty user name.
This changes the user name to "User unknown" when constructing a RevisionRecord
from a database row that has an empty ar_user_text resp rev_user_text field.

This may cause "User unknown" to be written to the database, if the
RevisionRecord is used as the basis for a new revision that is being created,
particularly during undeletion. Since "Unknown user" is listed in
$wgReservedUsernames, this should never lead to conflicts with actual user
names.

It is assumed that empty ar_user_text and rev_user_text fields will be 
fixed during migration to the new actor based database schema.

Bug: T195692
Change-Id: I506c513b019778d83741e47f0d11093f5ab67a54
2018-09-18 10:53:00 -07:00
daniel
f0d5aaa402 Set MCR migration stage to write-both/read-new AGAIN.
This is a re-submit of the config change at the heart of I15989adae2b5
which got reverted in I5426b5efd0 dues to T204065.

Bug: T198561
Change-Id: I7a85d0c4d8288df061841c9144d895af1318dc45
2018-09-12 17:52:08 +00:00
Lucas Werkmeister
b969226b86 Revert MCR migration stage to write-both/read-old
This partially reverts commit 9bd162dce2 (change I15989adae2).

Bug: T204065
Change-Id: I5426b5efd09dd1253883e405ec5db6d0ebac779e
2018-09-11 17:53:39 +00:00
jenkins-bot
388524219c Merge "[MCR] Set MCR migration stage to write-both/read-new." 2018-09-11 13:59:46 +00:00
daniel
9bd162dce2 [MCR] Set MCR migration stage to write-both/read-new.
This patch exists to see if CI passes with
$wgMultiContentRevisionSchemaMigrationStage set to
SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW.

NOTE: verify that $wgMultiContentRevisionSchemaMigrationStage
is explicitly set toSCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
in production config (T197816) before merging this.

Bug: T198561
Depends-On: Ib718868d2c768b6ea851355eef047bc0e6593495
Change-Id: I15989adae2b5916577d164c50d7da88774e49324
2018-09-11 12:27:42 +02:00
James D. Forrester
7cadf392f6 resources: Rename oojs-ui file paths to ooui per general branding
No change to the module names yet.

Change-Id: Ica33520b0128bd56dc06c8951bdc6932fce041fe
2018-09-10 14:35:45 -07:00
Amir Sarabadani
da9d5c2188 Schema change for reading ct_tag_id instead of ct_tag
Adding unique index on ct_tag_id and making indexes on ct_tag non unique

Bug: T193874
Change-Id: I24609c57e47308d1330a97527f4ea374d0d307ba
2018-09-04 19:29:48 +02:00
jenkins-bot
8cea6e052c Merge "Title: Fix isRawHtmlMessage() for messages with underscores" 2018-08-31 17:39:51 +00:00
Kunal Mehta
9e5edca6c5 Title: Fix isRawHtmlMessage() for messages with underscores
Title::getRootText() uses the text form (spaces) of the title, while
$wgRawHtmlMessages was specifying them in dbkey form (underscores).

And add tests while we're at it. Which spotted that the existing
code didn't work. Whoops. Fixed.

Change-Id: I05eea553c588e0f99f862e07ad15386507ed0728
2018-08-31 09:45:01 -07:00
jenkins-bot
1d9fd23ab3 Merge "Remove support for StartProfiler.php" 2018-08-29 01:16:33 +00:00
Aaron Schulz
9686c83554 Update $wgTranscludeCacheExpiry comment
Change-Id: Ic1f20c072174732f7fd8ecab9d366125d6f0c2d2
2018-08-28 10:28:45 -07:00
Gergő Tisza
2ed7bdc46d
Require editsitecss/editsitejs for editing raw messages
Bug: T45646
Change-Id: Ib16db04e499ad28216ee08b8cccccf3f141e2bad
2018-08-26 23:56:06 +02:00
Timo Tijhof
ebec274f17 Remove support for StartProfiler.php
Bug: T201782
Bug: T189966
Change-Id: I6ef5af969b1d74a04d5d89370e6ac800c20be1ad
2018-08-26 02:09:44 +00:00
jenkins-bot
3d2ed18dde Merge "MCR: Add temporary web UI mcrundo action" 2018-08-24 21:19:46 +00:00
Timo Tijhof
7f3c102a3b resourceloader: Implement mw.inspect 'time' report
When enabling $wgResourceLoaderEnableJSProfiler, mw.loader gets instrumented
with the following timing values for each of the modules loaded on the page:

* 'total' - This measures the time spent in mw.loader#execute(), and
  represents the initialisation of the module's implementation, including
  the registration of messages, templates, and the execution of the 'script'
  closure received from load.php.

* 'script' – This measures only the subset of time spent in the internal
  runScript() function, and represents just the execution of the module's
  JavaScript code as received through mw.loader.implement() from load.php.

  For user scripts and site scripts, this measures the call to domEval
  (formerly known as "globalEval").

* 'execute' - This measures the self time of mw.loader#execute(), which is
  effectively `total - script`.

To view the report, enable the feature, then run `mw.inspect( 'time' )` from
the browser console, which will render a table with the initialisation
overhead from each module used on the page.

Bug: T133646
Change-Id: I68d1193b62c93c97cf09b7d344c896afb437c5ac
2018-08-23 10:54:55 -07:00
Brad Jorsch
a9033efb28 MCR: Add temporary web UI mcrundo action
Since SDC doesn't actually require the edit form to handle multi-slot
editing, updating EditPage with its normal undo handling is being put
off for later. But in the mean time we still want some sort of "undo" to
work, hence this mcrundo that doesn't allow for editing.

Bug: T200216
Change-Id: I1f11d8ed141cb11576d2df883856d03e8f64bd38
Depends-On: Iedd9bf6c057e8b396a575bab700b15bd38b32cc9
2018-08-23 16:15:14 +00:00
James D. Forrester
66abb4ecaa Remove wgPasswordSenderName from DefaultSettings.php
This was removed from MediaWiki in 1.23 already, but was still
lingering in DefaultSettings.

Follow-up to: I578341430f53bef6d02b8ad78c1c1f2e6b96c064.
Previous, reverted attempt: acda2cc90a.

Bug: T97709
Change-Id: I94a0c7c20f78c31149685c4443564be240ddad50
2018-08-20 13:20:45 -07:00
Timo Tijhof
3bd1910f95 resourceloader: Remove wgResourceLoaderValidateStaticJS setting
Not used since 2011 (MediaWiki 1.18).

In an early version of ResourceLoader, we ran JSMinPlus syntax
validation on-demand on all served JavaScript content. This
was identified as cause of slowdown and high memory use, and
generally not considered as useful in production.

The reason it was there originally was not for the purpose of
validating static files, but for user-generated content.

So in MediaWiki 1.18, the behaviour of wgResourceLoaderValidateJS
was changed to only apply to user-generated content, and the
rest was disabled behind wgResourceLoaderValidateStaticJS, which
we then never use. Not even in development, given that we now
have superior experience through ESLint, even within IDEs where
supported.

Follows-up 49d3d18033 (r91914).

Change-Id: Ie25109a4fb23ee93fed0db4af5db4b11fe9ffe7f
2018-08-20 20:25:01 +01:00
Timo Tijhof
6ff469e57f Improve profileinfo.php documentation
* Move $wgEnableProfileInfo to DefaultSettings.php

* The configuration variable to enable the entry point was added
  together with the entry point itself in 9af3c09e5c (r9846).

* Change references to StartProfiler.php to refer to LocalSettings.php,
  given the former is deprecated since 1.31 (I4e8dd9558132).

Change-Id: I7ca5f2deace8645f06bebd915630c1de05c84bc5
2018-08-17 16:00:45 +01:00
jenkins-bot
329a72120e Merge "resourceloader: Remove $wgResourceLoaderLESSVars support" 2018-08-15 01:24:36 +00:00
jenkins-bot
a0b490bbe7 Merge "password: Move commonpasswords.cdb to includes/password/" 2018-08-14 23:53:19 +00:00
Timo Tijhof
ca510f742f resourceloader: Remove $wgResourceLoaderLESSVars support
The use of global variables was deprecated in favour of
ResourceLoaderModule::getLessVars() on a per-module basis.

Also moved testLessFileCompilation case to the appropiate file as it
covers ResourceLoaderFileModule.php, not ResourceLoader.php.

Bug: T140804
Depends-On: Ib1b2808df2384473bfac47f53a5d25d7c9bbca2b
Depends-On: I96047f69d01c4736306df2719267e6347daf556f
Change-Id: If708087c85c80355c7e78f1768529b5f2e16ed07
2018-08-14 18:57:45 +00:00
Aaron Schulz
f3a197e49b rdbms: add "maxReadRows" limit to TransactionProfiler
Change-Id: I008fc1857c7aa43d93f43361803d5e52c4ddf089
2018-08-13 13:30:08 -07:00
Timo Tijhof
553b4b0cd4 password: Move commonpasswords.cdb to includes/password/
Similar to other non-php files used by various classes/libs.

This leaves the serialized/ empty (apart from dotfiles), and as
such the directory was removed.

Change-Id: I538ffe0828843220ac4e161cf2e119deb9bd7ac0
2018-08-01 22:40:30 +00:00
Aryeh Gregor
b50aa7866d Fix documentation for $wgRightsText
Change-Id: I6e7b8501241276b91172df7f13dfc7a1227b23a5
2018-07-31 16:16:22 +03:00
Kunal Mehta
c96accbb60 Use LogPage::validTypes() instead of $wgLogTypes in a few places
This is preparation for T200385, which will add a hook to modify the
list of known log types, which will bypass the global variable.

Change-Id: I763cf8b71a98d1dba5f9964fc8d919a268c5d8a5
2018-07-28 19:09:08 +00:00
jenkins-bot
fc17ad555c Merge "Segregate right to edit sitewide CSS/JS" 2018-07-26 22:26:11 +00:00
Bill Pirkle
807125abdb Deprecate $wgShowSQLErrors and $wgShowDBErrorBacktrace and make nonfunctional
Clarify and simplify exception output by deprecating
$wgShowSQLErrors and wgShowDBErrorBacktrace.
$wgShowExceptionDetails will now control most related output.
$wgShowHostnames will now solely control output of
MWExceptionRenderer::reportOutageHTML.

Bug: T165768
Change-Id: Idead2c11c499463dfa6293c3d4b33be3bde92e1a
2018-07-25 10:38:19 -05:00
jenkins-bot
1655c86faf Merge "$wgHttpsPort should only be used in very special cases" 2018-07-24 01:13:32 +00:00
Gergő Tisza
db888bc5ad
Segregate right to edit sitewide CSS/JS
To limit the likelihood of incidents like T189665, the ability to
edit sitewide CSS/JSON/JS is split out from editinterface, into
separate 'editsitecss', 'editsitejson' and 'editsitejs' rights.

editsitecss, editsitejs, and the right to edit another (potentially
more privileged) user's personal CSS/JS is removed from sysops, and
a new user group, interface-admin, is created specifically for that
task (along with a new grant group 'editsiteconfig').

interface-admin is granted to the first user of a new wiki, along with
sysop and bureaucrat.

Bug: T120886
Bug: T190015
Depends-On: Ia9b2ea1450aff6121dc0f3777bf029292c8aaad9
Change-Id: Ifefd872640642441e26f8b2f144ffe4b88d2eb12
2018-07-22 12:37:32 +02:00
jenkins-bot
05a4432e2a Merge "Set default wgMultiContentRevisionSchemaMigrationStage to write-both" 2018-07-19 16:59:29 +00:00
jenkins-bot
8785fa24c9 Merge "LogEventsList: Remove unused messages" 2018-07-17 20:05:18 +00:00
Brad Jorsch
46fc7d142d Set default wgMultiContentRevisionSchemaMigrationStage to write-both
In progress of slowly rolling out MCR, this changes the default to
write both schemas while still reading only the old.

Bug: T198563
Change-Id: Ibd3279058d6ec3a2ce1cc6a2b3a503813d133917
2018-07-16 13:13:34 -04:00
Prateek Saxena
d85cba415e LogEventsList: Remove unused messages
…and update documentation for $wgFilterLogTypes.

Follows-up on Iba3c6aa5ac40dcdee0792c2d045b238b02d76521.

Bug: T199657
Change-Id: I46c5836e4131423f930d59a1c5e7937339478c33
2018-07-16 10:00:25 +05:30
Timo Tijhof
50386d4325 Clean up docs around $wgUseSharedUploads
* Remove references to these old configuration variables
  from documentation. Rather than wgLocalFileRepo referring to
  these for more information, move the docs there, and point
  there from the old variables.

* Move all their declarations in DefaultSettings.php together,
  and be in the same order as used in Setup.php.

* Add missing @var type and @since version docs.

Bug: T25122
Change-Id: I4eb9490ed4e978b2c3954de0593a9d0d3c5fe73c
2018-07-13 18:22:44 -07:00
Amir Sarabadani
9fed3f0fd3 Add config to use change_tag_def table for Special:Tags
Bug: T199334
Change-Id: Ieb8709caf0d8ee16086296baa75f751c7723c101
2018-07-11 16:44:28 +02:00
Tim Starling
8962915449 $wgHttpsPort should only be used in very special cases
When expanding a URL, don't overwrite an explicitly specified port or
add a port to a foreign URL. $wgHttpsPort is only useful for a very
specific case: when $wgServer is protocol-relative and HTTPS is
requested.

Documented correct use of $wgHttpsPort in DefaultSettings.php. Fixed
invalid "@see", in Doxygen it can only point to "classes, functions,
methods, variables, files or URL".

Added test cases which previously failed.

Change-Id: Id65c58300d22712212b6605711ff916916e8768b
2018-07-11 12:31:48 +10:00
James D. Forrester
874f5f7f0a Expand the default watchlist time from 3 to 7 days
Bug: T194414
Change-Id: I682161b93ea018dc1f552b6ac1a0555c162e7339
2018-07-10 16:08:58 -07:00
Brian Wolff
53a18d1294 CSP: Allow an option of disabling nonces
The current rollout plan calls for initial rollout to only
disallow external JS, and leave removing unsafe inline stuff
to a later date. Thus this adds a useNonces option to the CSP
config to allow that.

Renamed ContentSecurityPolicy::isEnabled() to isNonceRequired
for clarity. The old name has never been in a released version
of MediaWiki, so is removed immediately.

Change-Id: I756d8e97b77c6f97dbbf040a20c8750fecb157c5
2018-07-10 00:12:32 +00:00
jenkins-bot
fa321e4632 Merge "Introduce new schema flags and use them in RevisionStore." 2018-07-06 17:53:44 +00:00
jenkins-bot
c3cb2177a2 Merge "Changing the default for $wgPageCreationLog to true" 2018-07-05 19:11:12 +00:00
Timo Tijhof
4903284e22 Remove $wgBrowserBlacklist setting (deprecated, no-op)
Not used in Wikimedia Git nor elsewhere in Codesearch.

Is a deprecated no-op since 1.30.

Change-Id: If796e77e49cd42f66aa401c6d256b9e4a9826fbd
2018-07-04 21:43:16 +00:00