Use ParserOutput::getRawText() instead of deprecated getText().
This avoids a dependency on MediaWiki\OutputTransform classes,
which call into Skin and lots of other scary code.
Small updates are needed so that we continue stripping the TOC
and section edit links in this format.
This simultaneously reverts two patches that were only needed to work
around problems caused by markup added by OutputTransforms:
* Revert "Skip <h2> in TOC when extracting first section"
This reverts commit 60e1c5ad83.
* Revert "ExtractFormatter: Rescue headings from being removed"
This reverts commit 0fafa44a20.
Change-Id: Ie436576a356d05f2c4c4b84c8c1d82ba70d357d4
Add the config $wgExtractsExtendRestSearch to enable adding the extracts
to REST search as description. It is disabled by default.
Change-Id: I4335f161856b3a4035333de6eb4f547745480d91
PageIdentity does not have inNamespace() (it is from LinkTarget)
PageIdentity does not have getContentModel(), use the WikiPage instead
Inject a TitleFormatter to get the prefixed title text
Bug: T339384
Change-Id: I0029e718f20ca01ee3cd13ada8be04a16480d51d
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.
Bug: T271032
Change-Id: I612c09264b830fe5588aafdad80a9eebaa66d71b
All services can be injected by bumping minimum
version of mediawiki (1.34 would be enough, but
since that is no longer supported require 1.35)
Change-Id: I8bb1573a02932ef5f2871606e94a41afe073fd00
This is the equivalent of the current 'ApiOpenSearchSuggest' hook
as it once existed in the "OpenSearchXml" MediaWiki extension,
which merged into core and archived three years ago.
Change-Id: Ibe244851857ddff3a437acb12c3cc7660eb89089
* Use the ?? operator.
* Use "\u{00A0}" instead of "\xC2\xA0".
Also increase the minimum required MediaWiki version from 1.30 to 1.31
because 1.31 requires PHP7.
Change-Id: Ic5c279976f50b381cec65e74b7cc821a210c2173
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.
Bug: T183858
Change-Id: I78f8a3b4e06363a6af4a79189d1ff68697b34dcd
Changes:
- ApiBase::setWarning() is deprecated, use addWarning() instead
- ParserCache::singleton() is deprecated, use MediaWikiServices instead
- Exception import is not used, drop it
- added MediaWiki 1.29 as a requirement
Bug: T166714
Change-Id: Ib81e5acbb28e1f803c7a792b9f990f2aa6d57521
Script and input tags if outputted by other extensions can
theoretically allow an XSS issue.
Just in case let's do this here.
Bug: T107206
Change-Id: I889f7827fb9084b7cf853a1843fdc48821237d65
Moved most of TextExtracts.php to the new extension.json
and added method for backward compatable implementation
of the extension if still called though the php file. Moved
unit test hook to Hooks.php and deleted old il8n.php.
Bug: T87979
Change-Id: I3d26bd931ad2941268b94474f3e6327282da24ec