Commit graph

1659 commits

Author SHA1 Message Date
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
C. Scott Ananian
ea51801f79 Rename newly-added ParserOutput::appendOutputString() method
Tweaked the pluralization of the newly-added
ParserOutput::appendOutputString() method (now ::appendOutputStrings()
and ::getOutputStrings()), and name of the ParserOutputStrings class
(now ParserOutputStringSets), in an effort to continue repainting
bikesheds until the color is juuuust right.

Also extended the new method to cover ::addModules() and ::addModuleStyles()
and added support for these string sets in ::collectMetadata().

(These methods and the enumeration class were originally added in
b2cfa31eb6173e9f5e8607eadd126c33f8ce440b.)

Depends-On: I8bdffa55498d90e990af5bfc3332e3028b0a3539
Change-Id: Ibd41485d5db7779f01642e2144c50ed49d409812
2023-07-28 12:10:56 -04:00
jenkins-bot
23bcbf944f Merge "Add append/getOutputString to ParserOutput" 2023-07-27 17:34:21 +00:00
Isabelle Hurbain-Palatin
b2cfa31eb6 Add append/getOutputString to ParserOutput
This aims at providing an interface similar to setOutputFlag for string
sets, such as the ones used in CSP properties.

Change-Id: I6f103bd88802e66611e483403a2f8a540d54aae9
2023-07-27 11:37:11 +02:00
jenkins-bot
c16fae21f5 Merge "rdbms: Introduce InsertQueryBuilder" 2023-07-25 14:49:01 +00:00
Tim Starling
31e3fd4329 Add UserIdentityUtils service
Add a service for convenient interpretation of UserIdentity instances,
especially relating to the TempUser migration.

Bug: T341976
Change-Id: I94e8620cd3187f41f04cdf24b5b553baadfbc22d
2023-07-24 09:52:10 +10:00
Tim Starling
2aa87cdf2c Factor out TextDiffer hierarchy from TextSlotDiffRenderer
* Follow the TODO comment in TextSlotDiffRenderer
  ::getTextDiffInternal() by moving the code out to three parallel
  implementations, namely ExternalTextDiffer, PhpTextDiffer and
  Wikidiff2TextDiffer.
* Add a container/factory class ManifoldTextDiffer to glue them
  together and collate available formats.
* Move the inline legend to Wikidiff2TextDiffer. Not the toggle since
  the ability to toggle depends on the available format, not the current
  format.
* Update the diff cache keys so that ManifoldTextDiffer can store the
  engine=>format map it used to generate the diff.
* Drop support for the second parameter to TextSlotDiffRenderer
 ::setEngine(), since nothing used it anymore.
* Provide a format batch API, since some engines are able to efficiently
  generate multiple formats. This might be used by DifferenceEngine in
  future.

Needs risky change notification for the cache key change.

Bug: T339184
Depends-On: I8a35b9b8ec1622c9a36d2496bdd24f51bc52c85f
Change-Id: I5c506e39162855aff53dd420dd8145156739059c
2023-07-19 12:38:18 +10:00
Lucas Werkmeister
3c5a0c862f Html: Move encodeJsVar() + encodeJsCall() from Xml
These methods really belong in the Html class, not Xml. Leave behind
soft-deprecated Xml methods that forward to the Html ones, as well as a
class alias for HtmlJsCode (renamed from XmlJsCode).

Bug: T341779
Change-Id: I99a5f9de1411d4eb5ee30226b4e8ace3ea8b2c3b
2023-07-14 13:42:02 -04:00
Bartosz Dziewoński
25b40324f1 Remove SpecialPageAction and associated logic, route old URLs
Bug: T323338
Change-Id: I115ace5e82f55fd6652d61f05926e96ba569a8a9
2023-07-11 19:22:51 +00:00
Amir Sarabadani
d95a6b3167 rdbms: Introduce InsertQueryBuilder
Bug: T335377
Change-Id: I6e8a4ac0bdeaa1a4bd363190089dfc0f95f88ec6
2023-07-11 15:49:11 +02:00
Jon Robson
51c6fe6167 Login page: Use Codex CSS components
Changes:
* Use Codex markup instead of mediawiki ui markup
* We limit what can be customized by the skin
* Current rules for touch area and snapping of
inputs is moved from Minerva into core so other skins
benefit from the styling
* A placeholder text is adding to the "real name" field.
* Introduce CodexHTMLForm

Bug: T182050
Change-Id: I834cc0e07fc1e705753df6866a5eeda2ac77fb8e
2023-07-06 17:20:17 -07:00
thiemowmde
99230a7f72 Fix backwards compatibility alias for WordAccumulator
This was a mistake in I892364b. Unfortunately the codebase was in a
confusing state with many classes in no namespace. But this class was
in one.

Bug: T339184
Change-Id: Id31b9f53ffb6483c1901db8ab26fcb40368ec074
2023-06-26 16:30:51 +00:00
jenkins-bot
db8c4b0699 Merge "Improve handling of diffs between incompatible content models" 2023-06-26 01:06:58 +00:00
Gergő Tisza
a9e0562cfb Improve handling of diffs between incompatible content models
When the old and new content object for a slot cannot be compared,
show an error message for that slot only, instead of throwing an
exception.

Bug: T214217
Change-Id: I6e982df358f85ca78f0448b3a93ded3f40676310
2023-06-23 19:09:59 +00:00
jenkins-bot
8647f03800 Merge "Convert PageRedirectHandlerTrait to PageRedirectHelper" 2023-06-23 13:05:51 +00:00
jenkins-bot
923cbd131c Merge "Add maintenance/storage/fixLegacyEncoding.php" 2023-06-22 23:27:24 +00:00
Amir Sarabadani
bad7b08883 Add maintenance/storage/fixLegacyEncoding.php
To fix legacy encoding entries in external storage which means they
can't be fixed via calling moveToExternal.php.

The script originally was copy-paste and clean up of moveToExternal.php
but it made so much duplication that I went with subclassing.

Bug: T282734
Change-Id: Ic52e843f3dbe7d14cc8df5e8f3fe7aada7681bc9
2023-06-22 09:59:01 +02:00
Ammarpad
b6becee5eb Remove deprecated SkinTemplateNavigation hooks
- SkinTemplateNavigation hook
 - SkinTemplateNavigation::SpecialPage hook

Bug: T339969
Change-Id: I0aa4a593ae5c795ca2f75234f379e5ad0efa48aa
2023-06-21 23:20:01 +01:00