Param 'bar' was renamed to more descriptive 'sidebar' in the interface. The change should be reflected here.
Change-Id: Icdb57a4f801272d408161503d330f3260291c579
Functions references as callbacks are passed outside the class
Bug: T253922
Change-Id: I301283aeb814b558d338e600390b8af5679d7f70
Follows-Up: I44cd7ba39a898a27f0f66cf34238ab95370d2279
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
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
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
Removed conditional statement from getNewtalks() since
User::getNewMessageLinks does not support crosswiki functionality
and only returns a single array
Change-Id: Ic66e9caba836cca395c6c377ad55b67ee2fc3a3f
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
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
Remove use of ::newFromId, ::getPrevious, and ::getContentModel
Bug: T251073
Bug: T250981
Bug: T249021
Change-Id: I634b371d20cdf1a42ca3be77550717884f988d23
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
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
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
The fact that it is retrieved from NameTableStoreFactory is an
implementation detail that the caller need not know about
Change-Id: Iaa2d56bd559f73b3b9067ad92a977eeabc08c9d3