Commit graph

96595 commits

Author SHA1 Message Date
Ammar Abdulhamid
7c1a46ba88 Make hook parameters use consistent name as the Hook interface
Param 'bar' was renamed to more descriptive 'sidebar' in the interface. The change should be reflected here.

Change-Id: Icdb57a4f801272d408161503d330f3260291c579
2020-05-29 13:24:17 +01:00
jenkins-bot
ca6ec5a4ee Merge "Add 'ParsoidModules' as a top-level core attribute in extension.json" 2020-05-29 00:16:01 +00:00
jenkins-bot
5a412a6046 Merge "Use HTML5 semantics for self-closed HTML tags in wikitext" 2020-05-28 23:02:54 +00:00
jenkins-bot
d71fbb506b Merge "Injection.md - document ServiceOptions/CONSTRUCTOR_OPTIONS systems" 2020-05-28 22:38:16 +00:00
jenkins-bot
5e6112e8e2 Merge "Make FileRepo::newFatal() take variadic params" 2020-05-28 22:20:40 +00:00
DannyS712
e55e19c630 Injection.md - document ServiceOptions/CONSTRUCTOR_OPTIONS systems
Common way of injecting multiple configuration values

Change-Id: Ie7f7febf279baf34bad8b628911285bca3a008b5
2020-05-28 22:19:59 +00:00
jenkins-bot
7c645c4c95 Merge "docs: Add Doxygen alias for stable tag" 2020-05-28 22:09:21 +00:00
jenkins-bot
8895d06331 Merge "docs: Add Hooks defgroup tag" 2020-05-28 22:07:19 +00:00
jenkins-bot
02250ca0e1 Merge "Removing default focus on "Discard edits" in the AbandonEditDialog" 2020-05-28 21:59:38 +00:00
Reedy
f34c647098 Make FileRepo::newFatal() take variadic params
Change-Id: I84abb7e6f7126af647b69b038848bb4d68d846b0
2020-05-28 22:39:11 +01:00
Þjarkur
f7e66d1305 Removing default focus on "Discard edits" in the AbandonEditDialog
Bug: T249880
Change-Id: Ib48506a1debf259e4bd23ed1801fbc6c715219a0
2020-05-28 21:38:32 +00:00
jenkins-bot
8cbf108de7 Merge "immobile-source-namespace: use blanknamespace for main namespace" 2020-05-28 21:32:09 +00:00
jenkins-bot
21902b9bad Merge "Mark two FileRepo functions public" 2020-05-28 21:23:14 +00:00
Reedy
693df22570 Mark two FileRepo functions public
Functions references as callbacks are passed outside the class

Bug: T253922
Change-Id: I301283aeb814b558d338e600390b8af5679d7f70
Follows-Up: I44cd7ba39a898a27f0f66cf34238ab95370d2279
2020-05-28 22:03:02 +01:00
DannyS712
3618aac953 UserrightsPage: Restore visibility (previously implicitely public)
Methods had no visibility specified and were made private in
1c009dffe4, but are
overriden by CentralAuth's SpecialGlobalGroupMembership.

Make protected so that the overrides work.

Bug: T253909
Change-Id: Ib57237c2398ac91f8cebb5fe254ec5b28bac9255
2020-05-28 20:46:04 +00:00
jenkins-bot
9f868e6803 Merge "installer: Add overflow:hidden to help box" 2020-05-28 20:36:41 +00:00
jenkins-bot
24688cc0c5 Merge "mime: Update usage of MimeAnalyzer methods" 2020-05-28 20:32:05 +00:00
Ori Livneh
19931e069f mime: Update usage of MimeAnalyzer methods
Follow-up to I93bd71ec1.

Bug: T252228
Change-Id: I45c9fc592c9e41e0868e7d965206d4c04f4f92e1
2020-05-28 20:13:47 +00:00
jenkins-bot
aef18790c6 Merge "ExtensionRegistry: Remove exporting and caching of wgExtensionCredits" 2020-05-28 19:12:06 +00:00
jenkins-bot
1d9f48a255 Merge "mediawiki.notification: Remove the 'mediawiki.notify' module" 2020-05-28 18:55:12 +00:00
Timo Tijhof
5d8f62bdd3 ExtensionRegistry: Remove exporting and caching of wgExtensionCredits
This data is the same as the 'credits' data that is already compiled,
cached and made available via ExtensionRegistry.

Similar to various other configuration variables previously, the
$wgExtensionCredits variable is now also required to only be used
for providing input to the system (e.g. from LocalSettings.php,
or from legacy extension PHP entry points). It is no longer
supported to use this variable to reliably read out a full view
of all extension credits (specifically those registered via
extension.json).

Doing so had the downside of adding processing cost to every
web request, as well as taking one the single largest portion
of the ExtensionRegistry APCu cache key, which in PHP7+ incurs
a linear cost for every string value, string key, of every
(sub)array in this huge structure; and does to on every request
just in case something reads from $wgExtensionCredits.

The new method to access this information reliably is owned
by SpecialVersion for now (could be moved elsewhere). This
also makes the merging logic more testable and incurs it on-demand
rather than upfront.

Details:

* Move 'type' internally from NOT_ATTRIBS to CREDIT_ATTRIBS.
  These two arrays behave identically for most purposes (they are
  both used to mean "don't export this as a global attribute").

  By placing it in CREDIT_ATTRIBS it becomes complete and makes
  it easy to refer to in docs. Previously, extractCredits()
  read the 'type' key outside the loop for CREDIT_ATTRIBS.

* Remove redundant code in ApiBase.php, that is now more obviously
  redundant. Looks like a left-over or merge conflict mistake
  from when ExtensionRegistry was first introduced.

Bug: T187154
Change-Id: I6d66c58fbe57c530f9a43cae504b0d6aa4ffcd0d
2020-05-28 18:46:41 +00:00
jenkins-bot
6af5f1ec1e Merge "mime: Represent lists as arrays instead of space-delimited strings" 2020-05-28 18:31:22 +00:00
jenkins-bot
18d08e0ae8 Merge "Skin.php: Fix typo and simplify getNewtalks()" 2020-05-28 17:54:36 +00:00
Timo Tijhof
925dcac2e7 mediawiki.notification: Remove the 'mediawiki.notify' module
Follows-up 3a7b14ad (Ib5bc9aab0b1). No longer used anywhere
in core, bundled or WMF-deployed extennsions. Also no longer
used anywhere in user/site scripts of public WMF wikis.

Bug: T233676
Change-Id: Idcadf1d54b9ba5669d6949904f330fe4836fb54f
2020-05-28 17:48:41 +00:00
Clara Andrew-Wani
eb87d1d2bc Skin.php: Fix typo and simplify getNewtalks()
Removed conditional statement from getNewtalks() since
User::getNewMessageLinks does not support crosswiki functionality
and only returns a single array

Change-Id: Ic66e9caba836cca395c6c377ad55b67ee2fc3a3f
2020-05-28 13:06:26 -04:00
jenkins-bot
d325fa2c88 Merge "SpecialVersion: Consolidate internal use of wgExtensionCredits" 2020-05-28 15:44:02 +00:00
Ori Livneh
7e01e86e09 mime: Represent lists as arrays instead of space-delimited strings
Deprecate the interfaces in MimeAnalyzer that return lists as
space-separated strings in favor of replacement methods that return
arrays.

Deprecated:

 - ::getExtensionsForType( $mime ) : string|null
 - ::getTypesForExtension( $ext ) : string|null
 - ::guessTypesForExtension( $ext ) : string|null

Added:

 - ::getExtensionsFromMimeType( $mime ) : string[]
 - ::getMimeTypesFromExtension( $ext ) : string[]
 - ::getExtensionFromMimeTypeOrNull( $mime ) : string|null
 - ::getMimeTypeFromExtensionOrNull( $ext ) : string|null

- "From" is clearer than "For"[1] and is neatly symmetrical with "To"
  (viz. ::mExtToMime and ::mMimeToExt).
- "MimeType" is less ambiguous than "Type", which in this context may
  refer either to media type or MIME type.
- "{..}OrNull" is better because it helps users remember to handle a null
  return value. Putting the "OrNull" at the end (getXFromYOrNull) is
  better than putting it in the middle (getXOrNullFromY) because it's
  harder to ignore that way, at the cost of a very slight grammatical
  ambiguity.

Usage in Core will updated in a separate commit.

Lastly, this change prepares for the deprecation of mutating the public
'mExtToMime' attribute as a means of registering extensions. It will be
formally deprecated in a follow-up change.

  [1]: Positive signal: https://developer.android.com/reference/android/webkit/MimeTypeMap#getMimeTypeFromExtension(java.lang.String)

Bug: T252228
Change-Id: I93bd71ec18492722f05c66e0a2945d93281c3100
2020-05-28 15:15:43 +00:00
jenkins-bot
afcf9361d7 Merge "specials: inclusive language" 2020-05-28 15:09:31 +00:00
Ori Livneh
910b5af6b8 specials: inclusive language
Change-Id: I16ddb6f9d09735ac7621d449a37fbcae226ee6a0
2020-05-28 10:48:34 -04:00
jenkins-bot
af7939b830 Merge "Add $originalOptions parameter to UserSaveOptions hook" 2020-05-28 11:03:05 +00:00
Timo Tijhof
45da13803d resources: Bundle ajax patrol and ajax rollback code
Create a small "curate"-related bundle of moderation and review
enhancements. The overlap between the two is not perfect, but the
scripts are small enough that it doesn't seem worth trying to
create separate bundles for.

Change-Id: Ibd00e0eddfafc57323b147e225ee668528dc1c1c
2020-05-28 07:22:07 +00:00
DannyS712
7f7f8a137e ParamValidator qqq: Restore badexpiry messages removed by L10n-bot
See removal in 7bdf818823

Change-Id: I27125cb750bea5a976a771b7d8b24d0551f4754b
2020-05-28 07:19:09 +00:00
Translation updater bot
7bdf818823 Localisation updates from https://translatewiki.net.
Change-Id: I344ecf9bbeafb770924a05476d898eb8e95a5488
2020-05-28 08:37:32 +02:00
jenkins-bot
a6fd0a7084 Merge "EditPage::edit - remove use of Revision objects" 2020-05-28 03:30:48 +00:00
DannyS712
68ca964f56 EditPage::edit - remove use of Revision objects
Remove use of ::newFromId, ::getPrevious, and ::getContentModel

Bug: T251073
Bug: T250981
Bug: T249021
Change-Id: I634b371d20cdf1a42ca3be77550717884f988d23
2020-05-28 03:09:01 +00:00
jenkins-bot
ff12b51ee5 Merge "Hard deprecate Revision::getParentId and ::getVisibility" 2020-05-28 00:21:12 +00:00
apaskulin
1a4573e228 docs: Add Hooks defgroup tag
Doxygen requires a defgroup tag to initialize a group page. This patch
adds a defgroup tag to support existing ingroup tags in hook interfaces.

Bug: T253815
Change-Id: Ieed574ee798ad3a8460f3109a7d3512cfd0a85d8
2020-05-27 16:45:23 -07:00
Aaron Schulz
f0039707a2 Avoid HtmlCacheUpdateJob purges for content no longer in CDN
Bug: T250205
Change-Id: I0ddac44ec40e51acb8c76feff37c11481d724798
2020-05-27 23:36:54 +00:00
DannyS712
511fd87645 Hard deprecate Revision::getParentId and ::getVisibility
Bug: T250980
Bug: T250714
Change-Id: I8084607090266687395612be26ad2c06f9a60baa
2020-05-27 23:35:18 +00:00
Timo Tijhof
d4df7daa3b SpecialVersion: Consolidate internal use of wgExtensionCredits
Rather than each method reading directly from the global,
reduce this exposure to just one method, and pass it down from
there.

This is preparation for the next commit, which will consume
some of this information from ExtensionRegistry instead of
from a global variable.

Bug: T187154
Change-Id: I7d97a4cdc9ff3fe2b0be3b9367c4b783fe7388aa
2020-05-27 22:38:15 +00:00
jenkins-bot
d535ebeb51 Merge "WatchedItemStore: Enforce a maximum watchlist expiry duration" 2020-05-27 22:32:06 +00:00
jenkins-bot
500ece7e34 Merge "ServiceWiring for SlotRoleRegistry: use SlotRoleStore service directly" 2020-05-27 22:29:10 +00:00
apaskulin
34fe9930c6 docs: Add Doxygen alias for stable tag
To improve generated docs for hook interfaces, this patch adds
an alias that renders the stable for implementation tag in the
Doxygen output.

Bug: T253815
Change-Id: I866afb318de35744976942d38a17cf429c68a34d
2020-05-27 14:57:06 -07:00
jenkins-bot
671c98f5ae Merge "Add caption to always suppressing" 2020-05-27 21:00:09 +00:00
DannyS712
56f5dcd36b ServiceWiring for SlotRoleRegistry: use SlotRoleStore service directly
The fact that it is retrieved from NameTableStoreFactory is an
implementation detail that the caller need not know about

Change-Id: Iaa2d56bd559f73b3b9067ad92a977eeabc08c9d3
2020-05-27 20:42:42 +00:00
jenkins-bot
003b68085b Merge "MediaWikiServices: All logic for services should be in ServiceWiring" 2020-05-27 19:54:58 +00:00
jenkins-bot
ae4049fb6d Merge "Fix impedance mismatch with Parser::fetchCurrentRevisionRecordOfTitle" 2020-05-27 19:21:24 +00:00
jenkins-bot
5373d5722f Merge "Partially revert "Fix impedance mismatch with Parser::getRevisionRecordObject()"" 2020-05-27 19:21:16 +00:00
jenkins-bot
1a5db8c1c5 Merge "Inject SpamChecker where needed, hard deprecate EditPage static methods" 2020-05-27 18:48:58 +00:00
jenkins-bot
005d03f332 Merge "Make EditPage::$hookError private" 2020-05-27 18:48:08 +00:00