LinkCache::addGoodLinkObj was hard deprecated.
Use addGoodLinkObjFromRow() instead. PHPUnit tests
must use LinkCacheTestTrait::addGoodLinkObject().
Bug: T284955
Change-Id: I0c22be2f00e6d6d4ba6dd1511c5385cad55e8ff7
After the hooks were removed we are finally ready to stop
reading user options from primary before writing them on save.
The new save hooks only work on modified options, so options
saving code can be significantly simplified.
Change-Id: I48df616c9f35d9a0b2801ada1b7dbef0bd4ad058
Without a default the preference is treat as unknown and possible values
identical to the default are not excluded from javascript code or
database.
Bug: T291748
Change-Id: I37cf1cd87a5ef1fd91aba0c3cc4b0e3f9c9c08b4
This reverts commit 98878c08ba.
reason for revert: had some weird and unwanted side effects
Bug: T294265
Change-Id: I53c2175498af5b37096505dae011e65cebf029aa
Create ArchivedRevisionLookupTest to test ArchivedRevisionLookup.
Expand tests a bit and add two more for ::getPreviousRevisionRecord.
Change-Id: I3e176b24a13479464b7e73d062639ecb4db86f8f
User::isRegistered is part of the UserIdentity interface,
which makes moving from heavy User class to UserIdentity easier.
Change-Id: If44bfd398694c509272b3f89c93473b2e3c05759
These type-hints are definitely correct, but it's still
a relatively risky patch cause of how messy Title is.
I did some manual review of Title, all tests are passing,
but even still if this is approved, I'll add it to phab
as a risky deployment.
Change-Id: I1ed98ddae30066956e7adbde6780d6bab54dec04
Instead of putting logID/false in the status' value, add getters that
can be used to retrieve this information. Also, make it return an array
of log IDs, which is easier to expand later on to account for deletion
of related pages (e.g. associated talk page).
Note: this change will be backported to 1.37.
Bug: T288758
Change-Id: I7ef64242ae0cb7018a4b1e8eb004a5563925b9a4
After the unicode migration from HHVM-like to PHP 7.2 (T219279),
MediaWiki is running in production with default PHP 7.2 unicode, so
some of the char mappings overrides for mw.Title are no longer
nesessary, since PHP is now closer to JS.
Bug: T219279
Change-Id: Ic487c55b09ff81c1b7878651342d793982814a3e
On July 12 2011 in df2306b97 Roan added this workaround
for parse_url lacking support for protocol-relative URLs.
In 2012 PHP 5.4.7 came out, that added support for
protocol-relative URLs to parse_url, see [1].
It's 2021, and after a decade of honorably serving our
community, this workaround can be now be retired.
It's not a simple deletion since we have custom 'delimiter'
bit that wfParseUrl returns, and we need to keep supporting
that.
[1] https://bugs.php.net/bug.php?id=62844
Change-Id: If9b3bb2a51afa7af1ba8e674eadaa8db4f6f33f9
Updated the closure in WatchedItemStore::resetNotificationTimestamp() to return
an array obtained from MapCacheLRU->toArray(), instead of an object.
Updated the two places that fetch from the cache to read cache entries in either format,
for backwards compatibility.
Added testResetNotificationTimestamp_stashItemTypeCheck test to
WatchedItemStoreUnitTest which verifies correct behaviour with
cache values supplied by the test case.
Bug: T282105
Change-Id: Ibfe4c205ffdf7af7087f6f862004b95b29bdc394
This allows using the already into PageEditStash injected UserFactory
instead of falling back to global state in DerivedPageDataUpdater.
Change-Id: I18f198d323c3ca001c6a0de91bc669180cd1d11c
Encourage localization and factor out common code by taking a message
key as the first argument to ::addWarningMsg() instead of a wikitext
string. This also plays nicer with Parsoid by separating out the
localization code from the parse.
Bug: T293515
Change-Id: I6a7c04c67ac586ab00d4edcbb3d09485a7794e23