Also renames $action to $name in APIQueryExtracts.php, because trying to
document the parameter revealed that "action" doesn't match the use of
the parameter.
Bug: T170580
Change-Id: I1b7f3f0e17b118ea9bcfd28c69321aa692aad4e3
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
API Parse request fails from time to time which causes PHP notice
error. In order to understand whats going on lets introduce error
logging as temporary solution. This will give us possibility to
find the error instead of silently returning null. For now we will
keep old behaviour and return null in that case explictly. This will
avoid future php notice errors.
Changes:
- when API parse request fails log the error and return null
Bug: T169017
Change-Id: Ib908821b76a1e8b59235643854752c4f5910a274
Use the same expiry as the parser cache since this is a derivative of
the parser cache.
And avoid wfMemcKey while we're at it.
Change-Id: Ieba084aff4b8beb180da01d9cc4b8a2857569171
It confuses the code that munges the HTML to produce an extract.
By itself this won't fix the bug, but together with a core change to
avoid polluting the parser cache such as I5be25c6d it should work.
Bug: T165161
Change-Id: Ia1b654bf659958c04d7e370d4686cf17f615b591
Since this extension uses extension.json, it already requires 1.25+ so
no need to keep the old code around.
Change-Id: Id9e8fb026b26bb4db34fb22bd631205ce6f7072b
All API calls supports the generic parameter variant.
With I8a31dfd3cf2a3e8f768907084d26a77f198ccbe3 in core this parameter
is documented and generates no warning anymore.
Bug: T117529
Change-Id: Ic7e6f1df99c67ad4132c22503d99345611af271a
Some space characters like or $thinsp; usually is not indicate to the end of sentence, so shouldn't be used as separators.
Bug: T115817
Change-Id: Ieb56b0ef723dd299f848ea88b66613d92977bef0
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
Disables sentence termination at a full stop preceeded by a capital
alphabet which is likely to be an initial.
Bug: T115795
Change-Id: Ibf38e87823155c704ffb106642944cbd05e3f632
Allows sentences to end with numbers before a full stop in query
extractsentences.
Also added some more unit tests.
Bug: T118621
Change-Id: I9cbf487601d4165b490696d38d5fcbcf6d8f4637
Because the extracts depend upon template inclusion, to make sure
the extract is properly updated whenever the page's dependencies change,
use the page_touched timestamp instead of the latest revision id.
Since we're changing the cache key format, remove the 'mf' prefix from
back when it was still in MobileFrontend.
As a side-effect, this will also make action=purge invalidate the cache
since it updates page_touched.
Bug: T117322
Change-Id: Ib6f415c756c57caf6c83be495a4f229446e8b61e
Note that the sensitive information is still in the TextExtracts
memcached, so this requires security review (and either eviction
or a cache key change) before enabling other content models.
Bug: T107170
Change-Id: I57642e84db39d585c5b04453f86102b10fb69cdf
(cherry picked from commit f5c114c571)
Make the code compatible with both the old name (WikiPage::isParserCacheUsed)
and new name (WikiPage::shouldCheckParserCache).
Change-Id: If5d5da8eab132eb6d60f7141884ed2aeaa46e444
PS25 and later changed things around a fair bit, meaning the previous update
needs some further updating. In some cases additional cleanup is also necessary
for future core API changes.
Bug: T96595
Change-Id: I1573e523cf3c945fca95d8d2db002f5abcdbb29d
In the spirit of escaping as close to the output as possible, ensure
that the number of sentences is an integer before using it in a regex.
Just in case someone changes the api's param definition.
Change-Id: I406d6ed365ecd53bd8f56a09218a7e1403fe0fa9
Change I7b37295e for mediawiki/core deprecates several methods, and more
importantly changes the format of the data returned from
ApiResult::getData(). This change should handle these differences in a
backwards-compatible manner.
Change-Id: I7b37295e8862b188d1f3b0cd07f66ac34629678e
... so that per-span information for different languages, i.e. lang and
dir attributes aren't lost.
Bug: T59582
Change-Id: If1b04714fdc0f4d581ddb858d8d53f6f340dc10b