Commit graph

1676 commits

Author SHA1 Message Date
James D. Forrester
5088626212 Namespace 'special' Pagers under \MediaWiki\Pager
They're under 'specials' because that's where they're mostly used,
but they're just another kind of Pager (shown by their use outwith
the MediaWiki\Specials hierarchy, which is a bad code smell for us
to review later).

Bug: T166010
Change-Id: Iad3f91582b723c1e6679525aa852ffdfd8c6d5ba
2023-09-18 18:23:13 +01:00
James D. Forrester
b6f263b043 Namespace HistoryPager under \MediaWiki\Pager
Although it's in a different path, it's alone and only Action-related
because that's where it's used.

Bug: T166010
Change-Id: I6d4cebfd6ad68e1500c3a3a5450c97bfd3327c2b
2023-09-18 18:23:13 +01:00
James D. Forrester
3aeb9d681c Namespace core Pagers under \MediaWiki\Pager
Bug: T166010
Change-Id: Ibe12d1754709d48f71edd4cde1f13a542344a21e
2023-09-18 12:27:56 +01:00
jenkins-bot
e114026bab Merge "Add UserRegistrationLookup" 2023-09-15 16:59:54 +00:00
Martin Urbanec
85e78d22bd Add UserRegistrationLookup
Why:
Temporary accounts introduced as part of IP Masking are supposed
to expire 1 year after their registration. Accounts can have
multiple registration timestamps when in a wiki-farm setup,
depending on which wiki we consult.

To implement the account expiration logic, we need to know the global
(first) registration timestamp.

Similar to CentralIdLookup, a concept of a registration date
provider is introduced. Unlike IDs, users can have multiple
kinds of registration dates (Wikimedia recognizes local and global,
but third parties can have different needs). For that reason,
any number of registration providers can be registered at any
given time; caller determines which one is requested. The default
is `local`, which is the only provider that is guaranteed to exist.

What:
* Add UserRegistrationLookup
* Add UserRegistrationProviders config variable

Bug: T344694
Change-Id: If9fa12a392064dd504590a861a175e3604a34fab
2023-09-15 11:38:23 +02:00
James D. Forrester
0c0d8777a8 Namespace SpecialW* under \MediaWiki\Specials
This completes the namespacing of core special pages.

Change-Id: I195e7fc34a9413bfea0a33c941f2362cd4a7ff10
2023-09-15 09:01:31 +01:00
James D. Forrester
870f7c3f1a Namespace SpecialVersion under \MediaWiki\Specials
Change-Id: Ibeb181c653dac3796c44b36c8ff9f2ed572d5f42
2023-09-14 19:25:51 +00:00
James D. Forrester
87f2b083af Namespace SpecialU* under \MediaWiki\Specials
Change-Id: I75b04a7a65f8d37da12d2ed3892e065e97c92437
2023-09-14 19:24:08 +00:00
James D. Forrester
cc4570464c Namespace SpecialT* under \MediaWiki\Specials
Change-Id: Iaab14a0ded4950c5a6dafc2f301792b6546fb15f
2023-09-14 19:23:23 +00:00
James D. Forrester
a6f3c28865 Namespace SpecialS* under \MediaWiki\Specials
Change-Id: Icccdaa93f8089d88b6d3ba153ecfaa22c901ce66
2023-09-14 19:23:14 +00:00
James D. Forrester
ea2979b8ca Namespace SpecialR* under \MediaWiki\Specials
Change-Id: I735222c437313db139cd9fc780c332767189323f
2023-09-14 14:35:03 +01:00
jenkins-bot
99b0d1493d Merge "rdbms: Rename DatabaseMysqlBase to DatabaseMySQL" 2023-09-13 19:29:12 +00:00
James D. Forrester
f17ccb46ae Namespace SpecialP* under \MediaWiki\Specials
Change-Id: I10211c4406b1eedd6e5de63f1e57868f924640db
2023-09-13 14:41:15 +00:00
James D. Forrester
158e6ab5f2 Namespace SpecialN* under \MediaWiki\Specials
Change-Id: I403664ce3585f022e89da75e75baefa4b4db29f9
2023-09-13 12:30:32 +01:00
Amir Sarabadani
5dc9441b1d rdbms: Rename DatabaseMysqlBase to DatabaseMySQL
Now that we merged DatabaseMysqli with DatabaseMysqlBase, there is no
base anymore.

I could have gone with DatabaseMysql, and the naming is not that
consistent in rdbms:
amir@amir-ThinkPad-P1-Gen-3:~/core/includes/libs/rdbms$ find . | grep -i mysql
./platform/MySQLPlatform.php
./field/MySQLField.php
./dbal/MWMySQLPlatform.php
./database/DatabaseMysqlBase.php
./database/DatabaseMysqli.php
./database/position/MySQLPrimaryPos.php
./database/resultwrapper/MysqliResultWrapper.php
./database/replication/MysqlReplicationReporter.php

The majority is MySQL and since it's the correct form, I went with that
instead.

Change-Id: I3ee792f357dda974c855ba24b9b35e72fc73db06
2023-09-13 08:15:08 +01:00
jenkins-bot
7f9538e32a Merge "http: MultiHttpClient supports TelemetryHeadersInterface" 2023-09-12 20:42:27 +00:00
Piotr Miazga
8009e9d027 http: MultiHttpClient supports TelemetryHeadersInterface
Introduce a new interface Wikimedia/Http/TelemetryHeadersInterface
that provides telemetry information that could be attached to
HTTP Requests. MultiHttpClient is expecting `telemetry` option
of TelemetryHeadersInterface type.

The MediaWiki/Http/Telemetry implements the interface, therefore
ObjectCache can inject it to RESTBagOStuff, that further injects
it to MultiHttpClient.

Bug: T344926
Change-Id: I59a3f1048c403fe2e4ef0c74353dfe74ff9ca893
2023-09-12 18:05:17 +02:00
Amir Sarabadani
5bd33d46ef Reorg: Move WebRequest to includes\Request
This has been approved as part of RFC T166010

Bug: T321882
Change-Id: I6bbdbbe6ea48cc1f50bc568bb8780fc7c5361a6f
2023-09-11 21:44:34 +01:00
Amir Sarabadani
82478bd60d Reorg: Move SiteConfiguration to includes/config/
And namespace it to MediaWiki\Config

This should be eventually deprecated and removed but this has been
blocking the reorg for long enough.

Bug: T321882
Change-Id: I7a1a073495469623f6f77e6f74b23b7b4c18033a
2023-09-11 18:43:47 +01:00
jenkins-bot
342b9d4fc9 Merge "rdbms: Introduce ReplaceQueryBuilder" 2023-09-10 23:49:54 +00:00
Timo Tijhof
e56552557f deferred: Decouple DeferredUpdates from MediaWikiServices
* Create task-specific methods with simple defaults that require no
  mocking or stubbing of any kind, as used by the pure unit tests
  where service container (and by extent, storage services) are
  disabled.

* Remove all use of global variables, LBFactory, JobQueue,
  StatsdFactory, and RequestContext.

Bug: T265749
Change-Id: If85c448d2d1b806e70f641f06263680d49c6eeec
2023-09-09 20:42:02 +01:00
Amir Sarabadani
79172aed51 rdbms: Introduce ReplaceQueryBuilder
To replace IDatabase::replace()

Bug: T335377
Change-Id: I446f7a09cfc0ee37c2e016052d452751f7333e27
2023-09-08 11:37:26 +02:00
Amir Sarabadani
2faca8519b Introduce ArchiveSelectQueryBuilder
Similar to RevisionSQB (Ifd690dc8f030)

Bug: T344971
Change-Id: Ic520bcf09f4cc95ebd6a3990cff46dec5b7cd350
2023-09-07 17:03:22 +02:00
Amir Sarabadani
049b34b41c Introduce RevisionSelectQueryBuilder
Deprecating RevisionStore::getQueryInfo() and cleaning up a lot of code

Also removing a brittle test that wasn't really testing anything.

Bug: T344971
Change-Id: Ifd690dc8f030f86e3567a717eaeb830cb6dc703b
2023-09-06 12:30:38 +02:00
Amir Sarabadani
d8e542abf9 Reorg: Move three output related classes to includes/Output/
And namesapce them:
 - StreamFile
 - OutputHandler
 - OutputPage

Bug: T321882
Change-Id: Iedf8d88c595e580f2d8f0734c92aa5c45618ba33
2023-09-05 19:36:42 +01:00
Amir Sarabadani
e5eda1c358 Schema: Drop old externallinks columns and indexes
Already dropped from production

Also dropping FixExtLinksProtocolRelative as it's not useful anymore and
it has been run in previous releases so it's not worth fixing.

Bug: T312666
Change-Id: I1dd6e704b34e685ada6e316da11243d10827d769
2023-09-05 15:32:23 +02:00
jenkins-bot
ebf31d3149 Merge "Merge CommentStoreBase into CommentStore" 2023-09-04 15:05:24 +00:00
Gergő Tisza
7a21b9a032 Add UserGroupManager::getUserPrivilegedGroups()
This moves the core part of wfGetPrivilegedGroups() out of Wikimedia
config and makes it possible to move functionality built on it into
core.

Bug: T208477
Change-Id: I6536ef2909caeed047447e8b6a25831d6f00d827
2023-09-02 11:59:25 +00:00
Alexander Vorwerk
4a4d9e2621 Merge CommentStoreBase into CommentStore
Bug: T343558
Change-Id: I74cd68b7689f750d9300141575506910878f1802
2023-09-01 12:17:14 +02:00
Derick Alangi
68ccccfe0c
searchwidgets: Remove SimpleSearchResult(Set)Widget.php
This class was hard deprecated in 1.31 and is no longer used anywhere
per else after last usage.

See: https://codesearch.wmcloud.org/search/?q=%28SimpleSearchResultSetWidget%7CSimpleSearchResultWidget%29&files=&excludeFiles=&repos=

Change-Id: I6b4ecef871248e9978ee7afc1bd27de364525552
2023-08-31 16:12:43 +01:00
jenkins-bot
f071c22a9a Merge "rdbms: Drop old class aliases" 2023-08-29 10:47:27 +00:00
Amir Sarabadani
f4e68e055f Reorg: Move Status to MediaWiki\Status\
This class is used heavily basically everywhere, moving it to Utils
wouldn't make much sense. Also with this change, we can move
StatusValue to MediaWiki\Status as well.

Bug: T321882
Depends-On: I5f89ecf27ce1471a74f31c6018806461781213c3
Change-Id: I04c1dcf5129df437589149f0f3e284974d7c98fa
2023-08-25 15:44:17 +02:00
James D. Forrester
447400b423 rdbms: Drop old class aliases
Bug: T344536
Depends-On: I565541d781caaf564ae0c1877f5cb086e3650f22
Depends-On: Ia5fdf3242f9510e4f21670f3746d9364ae2935c6
Depends-On: I6f4b158bdc3ef20a1660e66accca0ffc17104f49
Change-Id: Ia87f1be7e0e68eb7cf792cb1f5ae64ecdfa2c015
2023-08-24 15:18:13 -04:00
jenkins-bot
484a95eaa8 Merge "Reorg: Move GitInfo to utils/" 2023-08-23 16:18:29 +00:00
Derick Alangi
ae8c71feae deferred: Drop support for DeferredUpdatesManager
Revert of I7f07eddf2fc399b15db4fe9be4c792ef8eb0747b.

Bug: T265749
Change-Id: I5ab08bda82a79a518dd508383c60863d73cfdac4
2023-08-21 22:57:41 +00:00
Amir Sarabadani
cb7351809e Reorg: Move GitInfo to utils/
Bug: T321882
Change-Id: Ibd8aff5f57555d5b2a3b9cd121c8919a5a96d313
2023-08-21 18:35:32 +02:00
Amir Sarabadani
c822159cb4 Reorg: Move ExtensionInfo to utils/
Bug: T321882
Change-Id: I5d0539821ded4ed9f2698ecbc76c2678612f1c97
2023-08-19 11:15:34 +02:00
Amir Sarabadani
15a278189f Reorg: Move MWTimestamp to MediaWiki\Utils
Bug: T321882
Change-Id: I48c10343295c4eb3d9ef8037343b0070e928f040
2023-08-19 05:53:40 +02:00
Amir Sarabadani
64a3552a40 ResourceLoader: Completely remove FileCache
When I was testing for caching in RL, I realized file cache is
completely broken and mostly useless, specially for not taking into
account new query parameters and thinking basically all RL modules are
uncachable.

Let's just remove this.

Bug: T330576
Change-Id: I5b17bfc4c5543bd0e96e1099c87341ddf8fd6572
2023-08-11 13:50:41 +02:00
jenkins-bot
e9da71ed5f Merge "rdbms: Merge DatabaseMysqli into DatabaseMysqlBase" 2023-08-08 22:15:00 +00:00
jenkins-bot
91e4316330 Merge "objectcache: Remove IExpiringStore interface" 2023-08-08 20:31:46 +00:00
Derick Alangi
2abbb1a774 objectcache: Remove IExpiringStore interface
Interface was deprecated since 1.35 in favor of ExpirationAwareness
or StorageAwareness interfaces. No longer used anywhere, see dependent
patches.

Depends-On: Ida557b3180eb5e7ebae46968142b4f154f26ffbc
Depends-On: I3d6fbf535560655472ade27c37b0e42b3e11a535
Depends-On: I2b0a669d41d9e6a8a859cba314c0e9e4c0ef40d7
Depends-On: I776040c2c8f61e25ae986e93bb1975fdd8bf9dd5
Change-Id: I9c5ffa9f51aec6356e3e27458fd098a37cd754ad
2023-08-08 20:15:03 +00:00
jenkins-bot
bd2e830346 Merge "Introduce FileSelectQueryBuilder" 2023-08-08 10:52:48 +00:00
jenkins-bot
49cb8edc37 Merge "http: Propagate tracestate and traceparent headers" 2023-08-08 01:07:08 +00:00
Piotr Miazga
67c1e15469 http: Propagate tracestate and traceparent headers
Introduce a Telemetry singleton for propagating `tracestate` and
`traceheaders` during a MW web request. This class allows for easier
testing and mocking.

In the future we might use this as a wrapper for OpenTelemetry.

Bug: T320559
Change-Id: I3e5e54afa21f8c099877b3765c769f2d2f8f5d61
2023-08-07 21:04:19 +00:00
Amir Sarabadani
291258adfd rdbms: Merge DatabaseMysqli into DatabaseMysqlBase
This should have been done long time ago.

Change-Id: I4935b0483a566266e5bc99542478387304843624
2023-08-07 20:37:09 +02:00
Amir Sarabadani
e569aedde5 Introduce FileSelectQueryBuilder
So much can be cleaned up with this

Bug: T311866
Change-Id: Ia4d46679c540c731b2ae8da2f8022fd6f5b931a4
2023-08-07 19:05:34 +02:00
Amir Sarabadani
974313663a Reorg: Move ProxyLookup to Request/
It's basically only used there.

Bug: T321882
Change-Id: Ibd9cac69772270b50152572ed618c692bbd5e4d9
2023-08-06 12:22:58 +02:00
jenkins-bot
ae38b1c09f Merge "Acquire a temporary user username before previewing" 2023-08-01 01:19:58 +00:00
Bartosz Dziewo?ski
ccbd669d83 Acquire a temporary user username before previewing
* Add an API action=acquiretempusername
* Add a mw.config variable with the temp user name
* Add mw.user.acquireTempUserName, which checks the mw.config
  variable, then fetches a name from the API
* Use mw.user.acquireTempUserName when previewing

Bug: T331397
Change-Id: Iec8a15dadd595bed0f7e54f907fbb8e192b45cf3
2023-07-31 10:48:20 +02:00