| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Referred to from
https://www.mediawiki.org/wiki/Wikimedia_Performance_Team/Backend_performance
Change-Id: I6e51a418757209e21d2a815f7cd6bce1ab086e1b
|
|
|
|
|
|
|
|
|
| |
The deprecation must be detected outside of the function,
which gets overridden, because there is no need to call parent by the
overridden function.
Follow-Up: Idd60ef34cd808952a3156fb61904f193a445b9f8
Change-Id: Ice85209f0bfe3bfdf7373cf9e1a728a1fe9d25b6
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use upsert() instead of a delete()/insert() when updating the timestamp
the query page was updated at in the querycache_info table.
== Test plan ==
* Run `DELETE FROM querycache_info` to clear the table.
* Run `php updateSpecialPages.php`, inspect querycache_info table to see
all query pages have a row with the correct timestamp.
* Wait a few seconds, re-run the update script, and look at the table
to see that the timestamp was properly updated.
Change-Id: I70c18906f2507e6ef3660b77ea99dd5650e3155f
|
|/
|
|
|
|
|
| |
Unused and discouraged. Can be replaced with getQueryInfo().
Bug: T244138
Change-Id: Idd60ef34cd808952a3156fb61904f193a445b9f8
|
|
|
|
|
|
|
|
| |
Part 1, proof of concept. Hundreds of files left to go. These changes
brought to you in large part by vim macros.
Bug: T305805
Change-Id: I44789091e9f6394c800a11b29f22528c8dcacf71
|
|
|
|
|
|
|
|
|
| |
Make phan stricter about conditional variable declaration
Remaining false positive issues are suppressed.
The suppression and the setting change can only be done together
Bug: T259172
Change-Id: I1f200ac37df7448453688bf464a8250c97313e5d
|
|
|
|
|
|
|
|
|
|
|
| |
Make phan stricter about null types by setting null_casts_as_any_type to
false (the default in mediawiki-phan-config)
Remaining false positive issues are suppressed.
The suppression and the setting change can only be done together
Bug: T242536
Bug: T301991
Change-Id: I0f295382b96fb3be8037a01c10487d9d591e7e01
|
|
|
|
|
|
|
|
|
| |
Fix MediaStatistics if $wgQueryCacheLimit is very small to still show
all entries as documented in the class.
Found by phan strict checks
Change-Id: Ic1a8a66063f6604db4a7e92c46df94a3f6d97711
|
|
|
|
|
|
|
|
|
| |
php internal functions like floor/round/ceil documented to return
float, most cases the result is used as int, added casts
Found by phan strict checks
Change-Id: I92daeb0f7be8a0566fd9258f66ed3aced9a7b792
|
|
|
|
|
|
|
|
| |
When the called function has a doc of int, it should be cast to be
explicit here.
Also cast for arithmetic operations to be explicit about the number
Change-Id: I905b78dfb66e66443e0e3203488bab5b548db543
|
|
|
|
|
|
| |
Change documentation to null or false where the type is allowed
Change-Id: Id8fd2b94a986e85af1c5aa6b4a8de2a9b3081b9e
|
|
|
|
| |
Change-Id: Ibdc16044fabfe9fe3677985d10b2dbe1ac2e7c84
|
|
|
|
|
|
|
|
|
|
| |
This helps phan to detect unreachable code and also impossible types
after the functions.
It helps phan to avoid false positives for array keys
when the keys are checked before
Bug: T240141
Change-Id: I895f70e82b3053a46cd44135b15437e6f82a07b2
|
|
|
|
|
| |
Bug: T254646
Change-Id: I5379dc79be60c99f0a30f74e5d624f81fe6f921b
|
|
|
|
|
|
|
| |
Standardized double-slash comments
Bug: T285484
Change-Id: I5dd8a0ecd78063751ae6d009359cdc449e1b2fb8
|
|
|
|
|
|
| |
Just an auto-replace from codesniffer for now.
Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If a special page is no longer expensive (by code or by config like
DisableQueryPages) the data should not longer stored in the database,
because always fresh data are shown and never the cached data
This does not delete on disabled query pages, because the data still
visible on the page.
This only affectes query pages and not very special pages like
ActiveUsers
Bug: T174513
Change-Id: Ia9015cb7bc0ab7b1a3d96d1b481c31b3e6c39657
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since 2011, FileDuplicateSearch has been especially awkward as a
QueryPage subclass. The only thing of value in the parent was
construction of <ol></ol> tags, but that's not enough to justify it.
getQueryInfo() was unused -- my motivation is to not have to maintain
it. A LoadBalancer was injected but was unused.
Change-Id: I2f0c18913260ee74ef266352bb93cfbdc1143d85
|
|/
|
|
| |
Change-Id: I676b26633103c10b1aa20646cbbe46e6450cc7cf
|
|
|
|
| |
Change-Id: Ib1fadd74f2f3223ea8a9343d1524533f00b991df
|
|
|
|
|
|
|
|
|
| |
The LinkBatchFactory service is only used in one method call in the
QueryPage class, so make it optional and provide it
when needed with a setter
Bug: T259960
Change-Id: Iee446b1defc9a4f116dc264b012ab972f89d95fc
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Every QueryPage needs a database to work
Inject the new service on special pages with already using services.
Bug: T259960
Change-Id: I96d91993b70052484c1a6a918a1e2ccc91e39ae7
|
|/
|
|
|
|
|
|
|
| |
The ContentLanguage is already present in the factory,
pass it to the created object and make every object aware of the
content language along with the user language for easier access
Bug: T259960
Change-Id: I32bbacbb45d0844ca99f0c5ee168be6a26e8974a
|
|
|
|
| |
Change-Id: I299900316c8d3129844a047228cd1c15ae7dff63
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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: Ie32c1b11b3d16ddfc0c83a757327d449ff80b2e4
|
|/
|
|
|
|
|
|
|
|
|
| |
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: I5ffbb91882ecce2019ab644839eab5e8fb8a1c5f
|
|
|
|
|
| |
Bug: T247862
Change-Id: I44d9dddd99c0106a30058cd80377a65f9b1694a9
|
|
|
|
|
|
|
| |
This eliminates code duplication:
SpecialPage::checkPermissions() does exactly the same thing.
Change-Id: I9ae84582b92ae1231f96df7ad453ffbe1f00614f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Member variables in HistoryBlobStub have been marked protected
SpecialPage::setListed() and listed() have been deprecated
CategoryPage::getCategoryViewerClass() and setCategoryViewerClass()
have been deprecated
Change-Id: Id1f530c2c8ec1171615f726dc7446431ee7ca8fe
|
|
|
|
|
| |
Bug: T243805
Change-Id: I8b084e447e12a330bdce2bff18fd7c756ac5f698
|
|
|
|
| |
Change-Id: I90cfe8366c0245c9c67e598d17800684897a4e27
|
|
|
|
| |
Change-Id: I94a0ae83c65e8ee419bbd1ae1e86ab21ed4d8210
|
|
|
|
|
|
|
|
|
|
| |
The run mode is used to show a different message on the special page,
instead of the current one "Updates for this page are currently
disabled. Data here will not presently be refreshed." even the data gets
updated with a different cron job.
Bug: T78711
Change-Id: Ib63d16bfea477dec43323b39671cc068530e2f0b
|
|
|
|
| |
Change-Id: I3a9f932acb7d9cf44a984b5d97f9fbc6b8670f7d
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add a method for delete the cached result for a page. This is
useful for backlog-type query pages which provide some interface
for fixing the problem in-place.
Change-Id: I36b750d71b6551bb5c662e82c24f029db01acd3b
|
|/
|
|
|
|
|
|
| |
When the value field is not provided in QueryPage::getQueryInfo,
it is set to zero, essentially randomizing the result. Use a
sequential index instead.
Change-Id: I8b67268e3c59a51ed00bd832f80df184dd771c3b
|
|
|
|
| |
Change-Id: Idb813c20bef0d41d0f9f01440daab4fee6cdb38d
|
|
|
|
|
|
| |
It is deprecated in 1.27
Change-Id: Ia10696a3d8e700cdf889c15e9b16b9d8e3e7f94f
|
|
|
|
| |
Change-Id: I1ec906cc7b284a3de02bb67fb41b5cf9e67ff3d2
|
|
|
|
|
|
|
|
|
| |
Removing viewPrevNext from Language and moving it to SpecialPage.
Used soley in special pages, and we aim to remove/reduce the dependency
of messages and language
Bug:T207977
Change-Id: I49b41a89ba59cfc24982b321f02c5cca9939decd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parameter passed to the execute() method of each special page can
be null, and usually is. In some of these files this fact was already
mentioned in the comment, but not listed as a type.
In this patch I also remove comments that do not explain much. Saying
that the execute() method of a special page "executes a special page" or
is the "main entry point to a special page" is not super helpful. That's
usually what the documentation in the parent class shoudl explain.
We can add @inheritDoc tags in all these cases if you prefer. Please
tell me.
Change-Id: I1d811ab0c6d5c956e36f6a74120a425abc4332e6
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This code was written in 2004, and pretty much untouched since then.
The last non-trivial update to this code was done in 2014 via I1de6301.
But as far as I can tell this was just maintenance, not motivated by
somebody actually using this code.
I suspect this is unused for a long time already, long before 2014.
Possibly even unused in 2004. Really: I tried to dig into the revision
history of the core codebase to find when and where this was used, and
when it became unused. I could not find anything. I also used
https://codesearch.wmflabs.org to make sure there are no known callers
or subclasses hidden anywhere. I could not find anything either.
In conclusion I suggest to skip any deprecation phase.
Change-Id: I5f52c44760b903bcb348bebf8c6a0f6faf8180b7
|
|/
|
|
| |
Change-Id: If5a6372e79038d3750d30a931badd0c110da2fe5
|