Commit graph

1398 commits

Author SHA1 Message Date
Umherirrender b442f100cd updater: Improve updater for table echo_unread_wikis
Follow-Up: I227801f850bb9d60488b5dd8b1f84c4c22708f5d
Change-Id: Idcc577a86045ffb2ea3f11d990b324ce6ab91cef
2022-04-19 21:27:11 +02:00
Umherirrender 42a61c84a6 Bump minimum required version for upgrade from 1.28 to 1.29
Remove sql patches, mention the gerrit change to check version
- Drop field etp_user in Ib57510e6b0e9202a7e035f8ea59955dca8a0b24a
- Add index echo_notification_event in
I99fc31a62b37259d7000577583c8e8a599e400f9
- Maintenance script RemoveOrphanedEvents in
Id42a893be81176f37d9d5e3fd7e850d3a6d42e10
- Add field event_deleted in Iacd098573efd92bb1e3fcd7da4cd40cea9522f15
- Add index echo_notification_user_read_timestamp in
Iacd098573efd92bb1e3fcd7da4cd40cea9522f15
- Add index echo_target_page_page_event in
Iacd098573efd92bb1e3fcd7da4cd40cea9522f15
- Add index echo_event_page_id in
I15abd7c901df58f7eb9e5476d58a1bc12835645e

Change-Id: I227801f850bb9d60488b5dd8b1f84c4c22708f5d
2022-04-12 16:20:19 +01:00
jenkins-bot 7d54187ce0 Merge "Call IDatabase::timestamp before inserting echo_unread_wikis" 2022-04-11 23:28:32 +00:00
jenkins-bot ad0d9d64a0 Merge "Call IDatabase::timestamp before inserting notification_read_timestamp" 2022-04-11 23:14:42 +00:00
Umherirrender c650698ac5 Call IDatabase::timestamp before inserting echo_unread_wikis
The default timestamp of 00000000000000 cannot represent as timestamp,
because it gets a negative timestamp -00011130000000

This is needed for proper cross-RDBMS support

This reapply a change from I46206e0b3a687dff3168a81cf0020e669133e876,
reverted with I1c8c409b7820512b3e31246a7f3d8c1cf4db209c.

Bug: T244898
Change-Id: I109b783de0a8d60ccb161b280ce5fa09e145017b
2022-04-11 23:12:02 +00:00
Taavi Väänänen 30306fd923 SECURITY: Send original client info on x-wiki requests
Bug: T285116
Change-Id: I0551fe64042676f8a2b35afb82a3b4e9c09ea673
2022-04-04 15:42:18 -05:00
gerritbot 49696ea763 Fix usage of ApiBase::PARAM_* deprecated constants
The ones that are replaced with ParamValidator

Bug: T275455
Change-Id: I6a096fa34fbd543d0ee4354f5487c73b8b3d37c7
2022-04-04 00:14:28 +00:00
gerritbot d9a082373d Replace deprecated ApiBase::PARAM_ with IntegerDef ones
The rest of ApiBase::PARAM_  will be done in separate patches

Bug: T275455
Change-Id: I897f02f9bae8a53b720a5a35e9689679c003c714
2022-04-03 22:14:48 +02:00
jenkins-bot 9c14f7b821 Merge "MarkRead: Remove redundant setAction()" 2022-03-31 12:41:51 +00:00
Func 8e13fddf35 MarkRead: Remove redundant setAction()
Using setTitle() should be enough.

Change-Id: I1ec8f2db0bd6781ac13b558da031c1809dcbc459
2022-03-27 21:03:43 +08:00
Ed Sanders 73d563cad9 Tweak primary button action styles in emails
Make buttons match the style guide a bit more closely:
* Use bold text
* Add border-radius
* Tweak padding

Change-Id: Idc929f2b7846c71c9a3011376402aaee65b32dcf
2022-03-26 23:29:18 +00:00
Ed Sanders 2c8c9e5b82 Split email CSS over multiple lines
Change-Id: I539f91b98ca833158b851b9ce826286c02141a8f
2022-03-26 23:29:15 +00:00
Umherirrender 592e53a925 Call IDatabase::timestamp before inserting notification_read_timestamp
This is needed for proper cross-RDBMS support

This reapply a change from I46206e0b3a687dff3168a81cf0020e669133e876,
reverted with I1c8c409b7820512b3e31246a7f3d8c1cf4db209c.

Bug: T244898
Change-Id: I8b1387aff18d88088a993bc099165e9882658ac0
2022-03-23 22:09:19 +01:00
jenkins-bot 3ce93e3368 Merge "Revert "Call IDatabase::timestamp before inserting rows"" 2022-03-21 14:02:39 +00:00
Hashar 9433b83f2d Revert "Call IDatabase::timestamp before inserting rows"
This reverts commit 4eb8fa23e4.

Reason for revert:

 Wikimedia\Timestamp\ConvertibleTimestamp::getTimestamp:
 The timestamp cannot be represented in the specified format

Bug: T304307
Change-Id: I1c8c409b7820512b3e31246a7f3d8c1cf4db209c
2022-03-21 13:28:37 +00:00
jenkins-bot 0acd3fea47 Merge "Call IDatabase::timestamp before inserting rows" 2022-03-18 13:56:59 +00:00
jenkins-bot 011cb2dec5 Merge "Make some DiscussionParser methods public instead of private for reusability" 2022-03-11 12:21:29 +00:00
Reedy 0efcb843dd Use namespaced EventLogging class
Change-Id: I42affe2633f39a3be02a78e4a6b5dd32b23ff7bd
2022-03-06 16:11:17 +00:00
Jack Phoenix 9ed8612642 Make some DiscussionParser methods public instead of private for reusability
Comments has been duplicating these methods for quite some time for no real reason other than that they're private here.
Duplicating these methods appears to be necessary if and when working with extensions where users can be @mentioned but which are
not implemented as ContentHandler subclasses or otherwise related to regular wikitext pages.

Change-Id: I9c097bab9c5eed8f2399c86897b1f8968126c765
2022-02-17 14:21:09 +02:00
Umherirrender 4eb8fa23e4 Call IDatabase::timestamp before inserting rows
This is needed for proper cross-RDBMS support

Bug: T244898
Change-Id: I46206e0b3a687dff3168a81cf0020e669133e876
2022-02-11 23:22:17 +00:00
Umherirrender 6af1473ca6 Replace deprecated wfReadOnly()
Bug: T283978
Change-Id: I5c796a0473599c71848b6079874bc7a969ee6f88
2022-02-11 23:39:06 +01:00
Umherirrender ffeee975a4 Replace deprecated User::newFromIdentity with UserFactory
Moved the factory deeper into the code right before the one usage it
still needed a full user object

Narrow done method arguments from User to UserIdentity
and use the identity directly

Change-Id: Ic118f23ef504c7fda892480df61ea68c10915f78
2022-02-11 20:35:49 +00:00
Umherirrender f21d2a5088 build: Remove unneeded phan suppression
Bug: T290624
Change-Id: Ie0209c72863aae8ac020a09e625f0c4613decca5
2022-02-11 20:57:34 +01:00
Siddharth VP d983f99f49 Exclude dynamic namespaces for page-linked-title muted list
The form UI currently allows selecting Special/Media pages, even though these notifications are not applicable on those pages.

Also:
- Update some comments regarding LoadUserOptions hook
- Remove $titleFactory as MultiTitleFilter doesn't require it any longer

Change-Id: I74f7b0091cb5f47c34a54958656e2bce20a394ec
2022-01-29 04:51:06 +00:00
Umherirrender 9bf6ceb738 Replace deprecated JobQueueGroup::singleton()
Change-Id: I298d8507f4ec706c235087b726b7b230ed5e9ac6
2022-01-25 22:24:53 +01:00
jenkins-bot a8af58f362 Merge "Parse section titles in notifs as if they weren't at the start of line" 2022-01-24 05:43:44 +00:00
jenkins-bot 302d272480 Merge "Allow overriding section title presentation in subclasses" 2022-01-24 05:42:12 +00:00
jenkins-bot ef3c4ff4e3 Merge "Avoid double-escaping in notification watch links" 2022-01-21 17:08:30 +00:00
jenkins-bot cc111b95bf Merge "Make JsonSerializable PHP 8.1 compatible" 2022-01-21 13:01:50 +00:00
Gergő Tisza 7a9bb5b7f2
Avoid double-escaping in notification watch links
Bug: T270156
Change-Id: I6973b6112fbb5caf409de168844ae2af20117bd7
2022-01-21 01:25:22 -08:00
Gergő Tisza e7248ea1ff
Make JsonSerializable PHP 8.1 compatible
Bug: T299695
Change-Id: If7d21100e7e20d8467685ae7515304cefabe4796
2022-01-21 01:18:18 -08:00
jenkins-bot ceda28121f Merge "Adjust doc for EchoNotification::readTimestamp" 2022-01-21 08:11:26 +00:00
Bartosz Dziewoński 3493317d79 Parse section titles in notifs as if they weren't at the start of line
The section titles are wikitext extracted from inside heading markup
like `== … ==`, so start-of-line markup like `*` should not be parsed.

Bug: T299572
Change-Id: Ie3995b943e5fe20ad86041d6be755f14f32eb01e
2022-01-21 00:07:53 +01:00
Bartosz Dziewoński f66c4283e9 Allow overriding section title presentation in subclasses
Change-Id: Idb3a87fd18330f90a8cdc1276994d54288e17b28
2022-01-20 23:50:47 +01:00
Kosta Harlan ac17edf21c EchoHooks: Don't call saveSettings in LocalUserCreated
$user->saveSettings() happens in AuthManager after the LocalUserCreated
hook finishes running.

Bug: T199393
Change-Id: I1e1826c9f304d7b6c8f3663196a48267a0af0bae
2022-01-12 19:21:53 +01:00
Umherirrender 8e974de839 Adjust doc for EchoNotification::readTimestamp
And simplify the null check
Fix tests to provide null and not the empty string

Change-Id: Ic0f2dc09525f1542c7e62da97ac0f3fe936ff67e
2022-01-05 20:29:03 +01:00
Alexander Vorwerk ce7532b212 Replace usages of deprecated wfWikiID()
The global function wfWikiID() is deprecated since 1.35 and it's usages
should be replaced with WikiMap::getCurrentWikiId().

Bug: T298059
Change-Id: Ia8cbc992eb80ee6d531cf11bdf2bc06181bce8b0
2021-12-21 02:01:11 +00:00
jenkins-bot 194b946b38 Merge "Specify that watchlist emails are only sent once per page" 2021-12-14 18:48:22 +00:00
Pppery cf1acd5048 Specify that watchlist emails are only sent once per page
Bug: T203941
Change-Id: I2a19b06dbddd927a0f9c046301abc698c2494b8d
2021-12-12 13:35:12 -05:00
jenkins-bot af28444bae Merge "Avoid using User::getOption() method" 2021-12-10 13:22:40 +00:00
vladshapik a3c55f6272 Avoid using User::getOption() method
Replace User::getOption() with UserOptionsLookup::getOption() since this method will be hard-deprecated.

Bug: T296083
Change-Id: I0ecdc63b0344bc4c24196cc5edb3d02b6a7ed615
2021-12-10 13:37:45 +01:00
Tim Starling 7dbc05fd8b Use the LinksUpdateComplete hook
* Use LinksUpdateComplete instead of the unusual hook
  LinksUpdateAfterInsert, which I want to deprecate.
* Fix the fixme regarding revert detection in link events. It's not
  pretty but I confirmed that it works with undo and rollback.

Bug: T297011
Change-Id: Ic0092a55e85a3db78db98f1a3dfdce74a7fa2b29
2021-12-08 16:23:14 +11:00
Tim Starling f79412202c Avoid LinksUpdate public properties
Access to these public properties will soon be deprecated.

Bug: T296895
Change-Id: I73575e654717aa2c49057c3b57c8eda1fc8da1e0
2021-12-08 16:23:14 +11:00
Cole White fea3813907 Pass entire response object to response attribute
Fixes mapper parsing errors in Logstash because most other producers
generate the response field as an object.

Bug: T239458
Change-Id: I95436dce23efde7f4aa460007187a7544cc36462
2021-12-01 01:31:53 +00:00
jenkins-bot e605f56df7 Merge "Construct title from RC title params" 2021-11-26 22:10:59 +00:00
Legoktm 1cf14cd87a Revert "Add echo-cross-wiki-notifications to DefaultUserOptions"
This reverts commit 617e22564f.

Reason for revert: Disabled cross-wiki notifications for everyone.

Bug: T296270
Change-Id: Ic770b18b11d0a7280f6e205b0593d7088f5ac725
2021-11-23 19:29:32 +00:00
Kunal Mehta 2cfe757af4 Suppress SecurityCheck-DoubleEscaped in DiscussionParser
For now, to get phan/CI to pass again.

Change-Id: Ie69da3fd2b2b5463e9d22f0d77d10ddf6dfb3c72
2021-11-23 11:24:29 -08:00
Kosta Harlan 8cbab216a9 Construct title from RC title params
If the page is deleted, we won't be able to find it (easily) in
WatchlistChangePresentationModel. Luckily there's support for using
backup data for constructing the title; we just need to pass along the
DBKey and namespace data in the extra params for the event.

Bug: T286192
Change-Id: I8e46de9599a213d9c22ce7bbedefa00528887f59
2021-11-03 15:47:50 +01:00
Umherirrender 617e22564f Add echo-cross-wiki-notifications to DefaultUserOptions
Without the default the preference is never deleted from the database,
even it was disabled by the user.

Bug: T291748
Change-Id: Id7c79d8e8f0de4f1d3d624a16fc3783fbded7f49
2021-10-26 20:28:57 +00:00
Reedy 4814d14b85 Update comment about AbuseFilterVariableHolder
Change-Id: I81f71179ce7af081bedf1ed36bdb1aed80f9a08f
2021-10-14 21:38:55 +01:00