| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
Change to use Authority object where possible
to use the interface instead of implementation
Change-Id: Ia7e9ce2a2f05ef2ae1cf981bf96faf48b04cf58d
|
|
|
|
|
|
|
|
| |
When revdel/suppress a log entry the change tags should be shown
as shown on Special:Log for the same log entry.
Bug: T109041
Change-Id: Ia2c89869008593ff765f06e61e0186b78539c18c
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
It is being dropped in production
Bug: T215466
Change-Id: I66b2cb8653252e720c897351065978119f040ba7
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The function deprecatePublicPropertyFallback is needed when the
deprecated class property no longer exists.
Just store the PageIdentity and fallback to title if needed.
Change-Id: I48f81e80c3cdd91f34da9d71344660ab5d27bda2
|
|/
|
|
|
|
|
| |
This covers all occurrences of /onfig->.*get( '/ in includes/.
Undoubtedly there are still plenty more to go.
Change-Id: I33196c4153437778496f40436bcde399638ac361
|
|
|
|
|
|
|
|
| |
The functions returning null or the class property is set explict null
Found by phan strict checks
Change-Id: I4a271093fb6526564d8083a08249c64cb21f2453
|
|
|
|
|
|
|
| |
rollbackPrimaryChanges
Bug: T297424
Change-Id: Id20d94d0ccc564038a1cd126f6675167929dbd55
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out this gets rid of a bunch of suppressed
"SecurityCheck-DoubleEscaped" that appear to have been accurate
warnings.
There seems to have been some confusion about how ::truncateForVisual()
is supposed to be used; in particular it is to be passed *unescaped*
output, because it is not (generally speaking) safe to truncate
HTML-escaped strings. The goal of ::truncateForVisual() is to have
a specific number of codepoints in the output for display purposes,
the encoding of those codepoints is not an issue (htmlspecialchars
can be applied to the *return value*.) If you need a specific number
of *bytes* you should be using ::truncateForDatabase(). If you want
a certain number of *HTML bytes* then the ::truncateHtml() method
is probably what you want.
Slightly refactor some code in RevDelLogItem to avoid a false positive.
Bug: T301205
Bug: T290624
Change-Id: I893362e049aedfa699043fcf27caf4815196f748
|
|\
| |
| |
| | |
Special:RevisionDelete"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Special:RevisionDelete
* Sanitize $img->getDimensionsString() within TraditionalImageGallery.php
* Sanitize width, height, nbytes messages within RevDelFileItem.php
Bug: T297543
Change-Id: I586a052595ecdc976476d4330510750a59099648
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Automatically refactors wg prefixed globals to use MediaWikiServices config using Rector. Doesn't include files that set globals or files that fail CI.
Rector Gist: https://gist.github.com/tchin25/7cc54f6d23aedef010b22e4dfbead228
* This patch uses a modified source code rector library for our specific use case and the rector will have different effects without it.
A writeup for future reference is here: https://meta.wikimedia.org/wiki/User:TChin_(WMF)/Using_Rector_On_MediaWiki
Change-Id: I1a691f01cd82e60bf41207d32501edb4b9835e37
|
|
|
|
|
|
|
|
| |
Nothing to learn from these.
You can find a longer explanation in the comments in I93751e6.
Change-Id: I195aae70fc282b58be5b18160783f27d38605d15
|
|
|
|
|
|
|
|
| |
Those "$comment ?? ''" are a bit ugly, but the other way around is
changing the return values of some ::getDescription implementations,
which is dangerous, at least.
Change-Id: I07e6b58258c256d19b058c56280150b70a46b407
|
|
|
|
|
| |
Bug: T254646
Change-Id: I2b120f0b9c9e1dc1a6c216bfefa3f2463efe1001
|
|
|
|
|
|
|
| |
Addition and remove of suppression needs to be done with the version
update.
Change-Id: I3288b3cefa744b507eadebb67b8ab08c86517c1c
|
|
|
|
|
|
|
| |
Hard-deprecating immediately as no known users in git outside of this repo.
Bug: T282894
Change-Id: I2a28394b3a5126bad8dbcfe4b0e4665d009132d7
|
|
|
|
|
| |
Bug: T282894
Change-Id: I31794e052d71160195dd3b6c29fea24bc98b356b
|
|
|
|
|
|
|
| |
This reverts commit 0d75fdb4f73ddbf4ad5f29e14258d58e507d55b4.
Bug: T287542
Change-Id: Iedd3461869f973f8d621a39e6ad4674cbb577551
|
|
|
|
| |
Change-Id: Id47e0fa26f1846be0313288275c903ab073c50bb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0
The following sniffs now pass and were enabled:
* Generic.ControlStructures.InlineControlStructure
* MediaWiki.PHPUnit.AssertCount.NotUsed
npm:
* svgo: 2.3.0 → 2.3.1
* https://npmjs.com/advisories/1754 (CVE-2021-33587)
Change-Id: I2a9bbee2fecbf7259876d335f565ece4b3622426
|
|
|
|
|
| |
Bug: T254646
Change-Id: I63cc8895033714bdfbf09aee933a8f0a43b387f3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a new schema migration stage in which rev_actor is used
directly and the revision_actor_temp table is no longer needed. This
becomes the new "new" stage whereas the previous situation is now
termed SCHEMA_COMPAT_TEMP.
Introduce migrateRevisionActorTemp which copies data from
revision_actor_temp to rev_actor. The code is similar to
migrateImageCommentTemp.php except that it doesn't delete from the old
table.
Partial revert of c29909e59fd89d9fc6. That change removed direct
references to $wgActorTableSchemaMigrationStage and made queries
involving revision_actor_temp be unconditional. Such changes need to be
reverted to make the use of revision_actor_temp be conditional again.
In ActorMigrationTest, I compacted provideGetJoin() and
provideGetWhere(), removing most of the duplication between expected
values. I gave all the stages a short name, and mostly used the name in
providers.
Bug: T275246
Change-Id: I7498107dd6433ab7de5bf2e7b3fe2aa5e10e345d
|
|
|
|
| |
Change-Id: I079d2c802d9b48d6abf7f37fa9ef7dafac631345
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates for the removal of the Revision class itself
and the various methods/hooks/variables removed in the
process, including:
- Update some documentation removing most references
to the Revision class and updating the MCR migration
notes to reflect the past tense for Revision methods.
- Change some capitalization from "Revision" to "revision"
to make it clear comments are about revisions in general,
not the Revision class in particular.
- Minor code tweaks including removing unused variables that
were around for the old hooks that were removed, and
removing the use of DeprecatablePropertyArray where no
longer needed for anything.
- Fix incorrect documentation for PageUpdater::getStatus(),
the status value changed a while ago to have revision-record
in addition to revision, and recently to only have the
revision-record, but ironically PageUpdater was never updated.
- Removed Parser::$mRevisionObject, used to be a Revision object
and was deprecated in 1.35, missed earlier because it was no
longer being set to Revision objects, always null.
- Add RevisionRecord typehints in DummyLinker to match those
in the corresponding Linker methods
This should be a no-op in terms of functionality.
Bug: T247143
Change-Id: I03bbb94fc29085855448780b1a5ad9063911ecc4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
developer's intention
array_fill_keys() was introduced in PHP 5.2.0 and works like
array_flip() except that it does only one thing (copying keys) instead
of two things (copying keys and values). That makes it faster and more
obvious.
When array_flip() calls were paired, I left them as is, because that
pattern is too cute. I couldn't kill something so cute.
Sometimes it was hard to figure out whether the values in array_flip()
result were used. That's the point of this change. If you use
array_fill_keys(), the intention is obvious.
Change-Id: If8d340a8bc816a15afec37e64f00106ae45e10ed
|
|
|
|
| |
Change-Id: I43ea7be80e8546e217d6aa371bb48f0699129cc4
|
|
|
|
| |
Change-Id: I8a45a8fdfa827f203e6bc123cb685d02c3612bb0
|
|
|
|
|
| |
Bug: T282825
Change-Id: I9966b206b053c8227e619521b5ad69561198443e
|
|
|
|
|
|
| |
RevDelList for now still uses a Title internally.
Change-Id: Id839ac697bd742e908f465cf5330da486dc73111
|
|
|
|
|
|
| |
Just an auto-replace from codesniffer for now.
Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This also tries to centralize adding logic of adding history-deleted
class as well. To make future changes easier.
This doesn't affect history deletion on files, recentchanges, and logs yet
Bug: T23272
Change-Id: I08f14f712479e1b170c606e2b64857f8386acd76
|
|/
|
|
|
| |
Bug: T278917
Change-Id: I1b78bad7e1fa43f5f82908567a7daad9c6cc79b9
|
|
|
|
|
| |
Depends-On: I963a79d94b9e39086940a43945def7c8eff1536d
Change-Id: If99d428b391c0eaf61396565af7f38740bef6c4a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ActorNormalization factory methods create
UserIdentityValue from the database rows, either via
fields of a joined table, or via a row from actor table.
They assume that the actor_id exist and throw othervise.
ActorNormalization is a storage-layer service providing
access to finding and acquiring actor_id.
The UserIdentityLookup methods do not instantiate new actor
on demand, they just find an appropriate row in the actor
table and return the result.
Bug: T272689
Depends-On: I74d81f3f0233efb17fc8df5178e4c477cc669c6f
Change-Id: Icfa1daca960c696a8cef8adab5eab53985802858
|
|
|
|
|
| |
Bug: T268713
Change-Id: I9ee516f4aa35e493a630299e8ba2c60edd4f06ba
|
|
|
|
|
| |
Bug: T268714
Change-Id: I5ae5c40761e6a534be85a7a068e6aa5933b043e6
|
|
|
|
|
| |
Bug: T258665
Change-Id: Ifddbf57f8aa2e3eb0d5845601376cbafa08ed407
|
|
|
|
|
|
|
|
|
|
|
| |
For compliance with the new version of the table interface policy
(T255803).
This patch was created by an automated search & replace operation
on the includes/ directory.
Bug: T257789
Change-Id: I17e5e92e24c708ffc846945a136347670a3a20c7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate all callers of Hooks::run() to use the new
HookContainer/HookRunner system.
General principles:
* Use DI if it is already used. We're not changing the way state is
managed in this patch.
* HookContainer is always injected, not HookRunner. HookContainer
is a service, it's a more generic interface, it is the only
thing that provides isRegistered() which is needed in some cases,
and a HookRunner can be efficiently constructed from it
(confirmed by benchmark). Because HookContainer is needed
for object construction, it is also needed by all factories.
* "Ask your friendly local base class". Big hierarchies like
SpecialPage and ApiBase have getHookContainer() and getHookRunner()
methods in the base class, and classes that extend that base class
are not expected to know or care where the base class gets its
HookContainer from.
* ProtectedHookAccessorTrait provides protected getHookContainer() and
getHookRunner() methods, getting them from the global service
container. The point of this is to ease migration to DI by ensuring
that call sites ask their local friendly base class rather than
getting a HookRunner from the service container directly.
* Private $this->hookRunner. In some smaller classes where accessor
methods did not seem warranted, there is a private HookRunner property
which is accessed directly. Very rarely (two cases), there is a
protected property, for consistency with code that conventionally
assumes protected=private, but in cases where the class might actually
be overridden, a protected accessor is preferred over a protected
property.
* The last resort: Hooks::runner(). Mostly for static, file-scope and
global code. In a few cases it was used for objects with broken
construction schemes, out of horror or laziness.
Constructors with new required arguments:
* AuthManager
* BadFileLookup
* BlockManager
* ClassicInterwikiLookup
* ContentHandlerFactory
* ContentSecurityPolicy
* DefaultOptionsManager
* DerivedPageDataUpdater
* FullSearchResultWidget
* HtmlCacheUpdater
* LanguageFactory
* LanguageNameUtils
* LinkRenderer
* LinkRendererFactory
* LocalisationCache
* MagicWordFactory
* MessageCache
* NamespaceInfo
* PageEditStash
* PageHandlerFactory
* PageUpdater
* ParserFactory
* PermissionManager
* RevisionStore
* RevisionStoreFactory
* SearchEngineConfig
* SearchEngineFactory
* SearchFormWidget
* SearchNearMatcher
* SessionBackend
* SpecialPageFactory
* UserNameUtils
* UserOptionsManager
* WatchedItemQueryService
* WatchedItemStore
Constructors with new optional arguments:
* DefaultPreferencesFactory
* Language
* LinkHolderArray
* MovePage
* Parser
* ParserCache
* PasswordReset
* Router
setHookContainer() now required after construction:
* AuthenticationProvider
* ResourceLoaderModule
* SearchEngine
Change-Id: Id442b0dbe43aba84bd5cf801d86dedc768b082c7
|
|
|
|
|
|
| |
RSSFeed::formatTime and AtomFeed::formatTime are private
Change-Id: I6bf081c31c92e7130ae0ae527ba4a8f4635c7de2
|
|
|
|
|
|
| |
Bug: T249393
Bug: T249021
Change-Id: I1e240adb2799978b7f4302f90e43f7d337a0fdd9
|
|
|
|
|
|
|
|
|
|
| |
Each file's changes are independent of the other files and can be
reviewed separately.
Bug: T250579
Bug: T250714
Bug: T250580
Change-Id: I223dd6dfba27e560aff89be6705d91c40c550dd8
|
|
|
|
|
|
| |
Mostly just narrower array types. A handful of other errors fixed.
Change-Id: Ied79d9e389867911bf83696dbb47f43305f8be7b
|
|
|
|
|
|
|
|
| |
Edited doc comments for hook interfaces to improve
consistency and add type hints.
Bug: T246855
Change-Id: I38fa802463cd6f39bf5946dbbeb1b3ebaea604b2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add hook interfaces which were generated by a script which parses
hooks.txt and identifies caller namespaces and directories.
Hook interfaces are mostly placed in a Hook/ subdirectory
relative to the caller location. When there are callers in multiple
directories, a "primary" caller was manually selected. The exceptions to
this are:
* The source root, maintenance and tests, which use includes/Hook. Test
hooks need to be autoloadable in a non-test request so that
implementing test interfaces in a generic handler will not fail.
* resources uses includes/resourceloader/Hook
* The following third-level subdirectories had their hooks placed in
the parent ../Hook:
* includes/filerepo/file
* includes/search/searchwidgets
* includes/specials/forms
* includes/specials/helpers
* includes/specials/pagers
Parameters marked as legacy references in hooks.txt are passed
by value in the interfaces.
Bug: T240307
Change-Id: I6efe2e7dd1f0c6a3d0f4d100a4c34e41f8428720
|
|
|
|
|
|
|
|
|
|
|
| |
Hard deprecation of passing Revision objects will follow soon,
but until that is ready core calls can be updated
There is some code cleanup that could be done around the calls, but
to simplify review no other changes are made.
Bug: T249561
Change-Id: Ifcfb3811650decffeaa87dc033c41fd1710b47a6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a re-submit of 35da1bbd7cb, which was accidentally merged before
CR (and reverted with aa4da3c2e8e).
The purge() method handles purging of both file cache and CDN, using
a PRESEND deferred update. This avoids code duplication and missing
file cache purge calls.
Also:
* Migrate HTMLCacheUpdate callers to just directly using HTMLCacheUpdateJob
* Add HtmlFileCacheUpdate class and defer such updates just like with CDN
* Simplify HTMLCacheUpdate constructor parameters
* Remove BacklinkCache::clear() calls which do nothing since the backlink
query does not actually happen until the job runs
Bug: T230025
Change-Id: Ic1005e70e2c22d5bd1ca36dcdb618108ebe290f3
|