Commit graph

985 commits

Author SHA1 Message Date
jenkins-bot e0b34b46d8 Merge "HookUtils: Fetch all needed props in one query" 2023-09-24 00:12:58 +00:00
Bartosz Dziewoński b4def00ed0 HookUtils: Fetch all needed props in one query
Bug: T347123
Change-Id: I54e5dfeb8ee07f0c3b6df4bffd2c6112cc1ad145
2023-09-23 06:35:49 +02:00
Bartosz Dziewoński 19fa706693 Action::getPageTitle() should return a Message
Bug: T343994
Change-Id: Ice968d8a5651a21260b9389526b4f7694b3deca8
2023-09-21 22:17:15 +02:00
Bartosz Dziewoński e825084546 SpecialPage::getDescription() should return a Message
Bug: T343994
Change-Id: I9902a7f0c2c74c34a887e4429f1de857bd087d28
2023-09-21 22:10:57 +02:00
Bartosz Dziewoński 6b633803c8 ThreadItemStore: Add details to row insertion exceptions
Bug: T343859
Change-Id: Ic0d741c192f42a3bd54276259820f25edcb0705b
2023-09-14 19:05:04 +00:00
Bartosz Dziewoński 70ff6fa463 SubscriptionStore: Tweak comment to fix Gerrit syntax highlighting
For some reason this apostrophe is treated like the start of a string
by Gerrit's syntax highlighting, messing up the whole file. It annoys
me very much.

Change-Id: Ie1ce88eefda6ae2a8a73237556affba4cbc6db4b
2023-09-14 17:58:16 +02:00
Bartosz Dziewoński 5d92dccafc TopicSubscriptionsPager: Handle invalid titles
This approach is borrowed from PageQueryPage in MediaWiki core,
and used in a few other places as well.

Bug: T345648
Change-Id: I7fbc3c3c1133da78eb9f15de9b2a51a90bcd1980
2023-09-05 23:40:52 +00:00
jenkins-bot 3a9bbd66a8 Merge "Hide ellipsis menu when the section is uneditable" 2023-09-05 22:44:49 +00:00
Ed Sanders 2c44828564 Hide ellipsis menu when the section is uneditable
Bug: T316388
Change-Id: I4a4f0888245ffa0c74935d24d8a64d2ed78080b7
2023-09-06 00:30:35 +02:00
jenkins-bot a1f2185a0f Merge "Acquire a temporary user username before previewing" 2023-08-30 13:15:05 +00:00
Rajashree Talukdar bc495dfd10 DiscussionToolsDebug: check whether the given page exists
Check whether the page given to DiscussionToolsDebug exists or not.
Without the check, it throws Wikimedia\Assert\PreconditionException.
Add 'exists' => true in the getFormFields() array.

Bug: T338480
Change-Id: I57222f60cb5c5645e6bc97b86be22c502c85d650
2023-08-26 21:42:59 +05:30
jenkins-bot 3583d7367a Merge "Fix exception trying to store comments transcluded from special pages" 2023-08-24 16:36:40 +00:00
Bartosz Dziewoński 5c612862a1 Acquire a temporary user username before previewing
When rendering a preview of the comment in order to check whether it's
signed, use the previously acquired temporary user username for the
signature.

Depends-On: Iec8a15dadd595bed0f7e54f907fbb8e192b45cf3
Bug: T331397
Change-Id: I7aeb1cc4c107ed752dc805405780a7609a6d4d3c
2023-08-22 23:42:32 +02:00
Bartosz Dziewoński dd58d07ff5 Fix exception trying to store comments transcluded from special pages
Bug: T344622
Change-Id: I57dbd088dff15ac2cd9998663d7eac60dccd0dec
2023-08-21 19:02:42 +02:00
Umherirrender b160472953 Use namespace MediaWiki\Request\DerivativeRequest
Bug: T321681
Change-Id: Ia9e4557af6fc958d2c3e61cb876958540d25674b
2023-08-20 01:39:56 +02:00
Umherirrender fd0de6b09a Use namespaced Title
Bug: T321681
Change-Id: I66a498679d0743b7740887c636eca001efc170cd
2023-08-19 20:16:15 +02:00
gerritbot dfb413ed81 Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I688fe73f46ecc2bbd8f4c59fc42b8e85fadf7689
2023-08-19 04:14:36 +00:00
Umherirrender 1a8ee0f3d1 Call IDatabase::insertId only when a row was inserted
As docs says on IDatabase::insertId

Change-Id: I4a61ce625c4f31316bb9eee83f293a438bac2e0e
2023-08-16 20:54:09 +02:00
jenkins-bot ca800cf631 Merge "Use UpdateQueryBuilder and InsertQueryBuilder" 2023-08-16 18:50:19 +00:00
jenkins-bot d28b11383e Merge "Make ApiDiscussionToolsEdit non-internal, add 'tags'" 2023-08-16 17:00:37 +00:00
Martin Urbanec 16ac49fe61 Make ApiDiscussionToolsEdit non-internal, add 'tags'
What:
Growth wants to use ApiDiscussionToolsEdit to
post questions on behalf of new users (to make use
of the auto-subscribing logic DiscussionTools has).

This seems like a good moment to make the API
non-internal.

What:
* Add support for 'tags' parameter
  (this doesn't actually work w/o the depends-on)
* Add autosubscribe parameter to give more control
  to callers over whether autosubscription is used.
* Remove isInternal()

Bug: T343339
Bug: T333632
Depends-On: I0ac60ca8473fe28461b2da60f9911baac4994388
Change-Id: I39727de40557d2494f4d60bf224490caaedfdee1
2023-08-16 16:52:38 +00:00
jenkins-bot a7b703c589 Merge "Use HookHandlers for BetaFeatures hook" 2023-08-16 08:51:41 +00:00
jenkins-bot de9ad429ee Merge "Use HookHandlers for Echo hook" 2023-08-16 05:26:09 +00:00
Umherirrender e5cbc838a8 Use HookHandlers for BetaFeatures hook
Bug: T273303
Change-Id: I685eb618b7ca2dc5b10bc5f08bfd235f682ff3c5
2023-08-16 05:23:25 +00:00
Umherirrender 3515751592 Use HookHandlers for Echo hook
Bug: T273303
Depends-On: Iffa2b409502b4269c9746e0304feb4aaee37a86e
Change-Id: I489a37b7b377b874ab3384bdc071e9c63701345a
2023-08-16 00:39:43 +02:00
jenkins-bot a6ffd38185 Merge "Remove 'internal' flag from ApiDiscussionToolsSubscribe/GetSubscriptions" 2023-08-15 16:03:24 +00:00
jenkins-bot b52bff0257 Merge "Handle Parsoid resource limit exceeded exceptions" 2023-08-14 13:33:49 +00:00
C. Scott Ananian 0de3f468c3 Remove unnecessary use of Parser
Change-Id: Ib86ed6300ae85d7d69557a11bbd8f7b409e11d6c
2023-08-12 00:23:49 +02:00
Arlo Breault 3d9585acbe Handle Parsoid resource limit exceeded exceptions
Parsoid can be expected to throw limit exceeded exceptions so a more
graceful response should be provided.

Bug: T325298
Change-Id: I6bedc7639a68311d5247331d5e53f88c004ebc5e
2023-08-11 18:06:26 -04:00
Bartosz Dziewoński 505aef8a60 Use UpdateQueryBuilder and InsertQueryBuilder
Change-Id: I8d8377a0ad3472d193b1bf9b20c8966bb6b34dd7
2023-08-11 21:59:03 +02:00
Ed Sanders db53ae0a48 Remove 'internal' flag from ApiDiscussionToolsSubscribe/GetSubscriptions
Bug: T329474
Change-Id: Ie8e745fc83a320134d3790012311c4b35c7f3934
2023-08-07 15:14:58 +01:00
Bartosz Dziewoński a783b9371f ThreadItemStore: Ignore duplicates caused by duplicate executions
For some unknown reason our updates are being processed more than once
at the same time. Ignore or work around the "duplicate entry" errors
caused by that.

Bug: T323080
Bug: T341811
Change-Id: Iaae1dc2d5ed5bf4ac6760fb1d39dc21f2af89e9a
2023-08-04 18:56:36 +00:00
Bartosz Dziewoński 66b1ca1578 ApiDiscussionToolsPreview: Add missing documentation messages
Bug: T342634
Change-Id: If550d6ccf6fb8256d2f252d796f8bc4651dc8f7b
2023-08-04 20:55:13 +02:00
jenkins-bot f86bd42f01 Merge "Enable automatic topic subscriptions for autocreate accounts" 2023-08-01 16:38:27 +00:00
Ed Sanders eb8a689069 Enable automatic topic subscriptions for autocreate accounts
Bug: T332618
Change-Id: I0a9ed795b7a28365bca199a2db44217e53063002
2023-07-31 13:39:46 +01:00
Ed Sanders e389fc48f1 Always use === in PHP
Change-Id: I30ca7cdf73921dcae48997841816099972cdbed0
2023-07-26 14:29:40 +01:00
jenkins-bot 5bf0110b4b Merge "Replace uses of UserNameUtils::isTemp with UserIdentityUtils::isTemp" 2023-07-26 12:54:48 +00:00
jenkins-bot e0763d81ed Merge "Use strict comparison with array_search" 2023-07-26 12:09:21 +00:00
Thalia ec8048131d Replace uses of UserNameUtils::isTemp with UserIdentityUtils::isTemp
Where a UserIdentity is available, use UserIdentityUtils, which has
fewer dependencies.

Change-Id: I035bfbc7801f4ac77a8c6f0991f0fdf71b8fb429
2023-07-26 11:32:27 +01:00
Ed Sanders 1bb29faa58 Use strict comparison with array_search
Change-Id: Id920d49701bd9436a6247763ed40df052877ad2f
2023-07-24 18:50:00 +01:00
Bartosz Dziewoński 1b80b1ffcf ThreadItemStore: Look harder for invisible rows
This reverts 08e1073f58 (T322701),
which does not work, and instead uses the same solution as
4439e934429617cc77f34cc9c783f0b52a06c920 (T247553).

Bug: T339882
Change-Id: I1b6772b1cdfd0d7e1c603333a2e43152d3591c38
2023-07-16 00:45:52 +02:00
jenkins-bot 218d3aea38 Merge "Backend changes related to topic subjects in message body" 2023-07-11 15:21:50 +00:00
jenkins-bot 7b147cffbf Merge "ApiDiscussionToolsPageInfo: Allow excluding signatures" 2023-07-11 15:17:02 +00:00
jenkins-bot 5b2d1046ad Merge "Reload page or redirect when saving an edit creates a temp account" 2023-07-11 15:16:59 +00:00
jenkins-bot ce286af8dc Merge "Suppress the empty state in previews again" 2023-07-11 13:59:49 +00:00
Bartosz Dziewoński 90f8fe5ec1 Reload page or redirect when saving an edit creates a temp account
Depends-On: I6cdc014fb39d35ce1f091b53dc3a9c4a3c95f9e9
Depends-On: I01e13ce1ebab462eeb0ba3847d4205a88965a127
Bug: T338002
Change-Id: I768e4fa2030d781bbc65428371bda17a87bd6a42
2023-07-10 22:55:58 +00:00
jenkins-bot cb700abb8c Merge "SpecialFindComment: Allow spaces instead of underscores in the input" 2023-06-24 10:40:20 +00:00
Bartosz Dziewoński 80746017bb SpecialFindComment: Allow spaces instead of underscores in the input
Our IDs and names are correctly written with underscores, but allow
spaces too for consistency with the behavior of internal wiki links
when linking to a subpage of Special:FindComment.

Change-Id: Ib9f67ac02d963395db9d56951946b9747a410a88
2023-06-24 10:47:48 +02:00
jenkins-bot 6de3603990 Merge "ApiDiscussionToolsEdit: Allow not returning the new revision content" 2023-06-22 21:31:32 +00:00
Bartosz Dziewoński 14d9652a78 Backend changes related to topic subjects in message body
Our edit API now recognizes topic subjects in the message body,
generates edit summaries from them, and optionally returns an error
if no subject is provided.

Bug: T334163
Bug: T338390
Change-Id: Iac3778a4a88a4def234be9d10b80d9796d35bceb
2023-06-22 10:35:04 +02:00