Commit graph

2682 commits

Author SHA1 Message Date
Alexander Vorwerk 538e543a32 Fix namespace for ConfirmEditHooks
ConfirmEdit should be added as a phan dependency, so thing like this no
longer happen in the future.

Bug: T296287
Change-Id: Ic9942b3a6d872c0d3c0e3a53d9462df6f82b06c6
2021-11-23 12:09:44 +01:00
Translation updater bot 5d7b92a023 Localisation updates from https://translatewiki.net.
Change-Id: Iba2243880e1f049d6fb404a6a50e3f576039661d
2021-11-22 09:04:01 +01:00
Fomafix 4da6f5b3b5 Use namespace MediaWiki\Extension\WikiEditor in PHP
Change-Id: I0be9b88accafce97f7e9b7524ec740fb576fa11c
2021-11-20 09:30:11 +00:00
jenkins-bot c820a43220 Merge "Add live-preview logging" 2021-11-20 04:47:40 +00:00
jenkins-bot 8a4c9a2077 Merge "Add logging for non-live previews" 2021-11-20 04:46:03 +00:00
Translation updater bot 1cc508d876 Localisation updates from https://translatewiki.net.
Change-Id: I78631e3f154934d99d320f73928b53a71a90d4e7
2021-11-19 08:28:54 +01:00
Translation updater bot c4e6ecb0f1 Localisation updates from https://translatewiki.net.
Change-Id: Ie5f928f439804767d853edb99df82c4112f14be5
2021-11-18 08:42:40 +01:00
Sam Wilson 3f275059df Add logging for non-live previews
This isn't strictly WikiEditor business, but other logging is done
here, and soon real-time previewing will be built in WikiEditor,
so it makes sense to keep all the logging for the different types
of preview together.

Bug: T290521
Change-Id: If42697e43c1bec95d743244d0acf96c47df8b681
2021-11-18 08:24:37 +08:00
Translation updater bot 2e99579930 Localisation updates from https://translatewiki.net.
Change-Id: I5b068748310886e4fae1044170b77542ef6ec290
2021-11-17 08:31:11 +01:00
Sam Wilson a70bd3876e Fix bug when target looks like internal link
Refactor the code for selecting the first match, so it can also
be called from the look-like button method — this will be changed
once the whole link-inserter dialog is OOUI.

Bug: T295517
Change-Id: I56b289dbf07707b0391b263464bdfd6307142574
2021-11-17 09:27:34 +08:00
Translation updater bot 72191d0ba6 Localisation updates from https://translatewiki.net.
Change-Id: I38d60951ae33441844e32161c084c7b76370ed63
2021-11-16 08:16:37 +01:00
jenkins-bot 5963a3ef5f Merge "Fix comma splice in a message" 2021-11-15 23:25:22 +00:00
Translation updater bot a78830505e Localisation updates from https://translatewiki.net.
Change-Id: I5c11ed1e802fe585a001141497b22d554bff0d33
2021-11-15 08:13:12 +01:00
jenkins-bot fd74287b2f Merge "Replace WebRequest::getVal by WebRequest::getRawVal" 2021-11-12 18:25:38 +00:00
jenkins-bot 3c4334d6be Merge "Replace usage of ConfirmEdit_ActivateCaptcha random properties." 2021-11-12 15:37:31 +00:00
Translation updater bot 48e0f19f4e Localisation updates from https://translatewiki.net.
Change-Id: I601d8229d21592c214e74e3af75f121c43f50615
2021-11-12 08:29:57 +01:00
Roman Stolar b76f02e580 Replace usage of ConfirmEdit_ActivateCaptcha random properties.
Use CacheKeyHelper to get a status from SimpleCaptcha instead of it.

Bug: T275710
Depends-On: I7942ccd6b58584f436f872bf7c9deb63ab84482a
Change-Id: Id35ef3bcf30ddc0581c79cc10fa80e54d5352758
2021-11-11 17:11:27 +02:00
Translation updater bot 90fb0ba6f9 Localisation updates from https://translatewiki.net.
Change-Id: I689a7432ef84b9801092c48d551b1172df1e3699
2021-11-11 10:03:12 +01:00
Translation updater bot 66281847ab Localisation updates from https://translatewiki.net.
Change-Id: I1d2821d70762568cb906d26371dfe5193cf03def
2021-11-08 08:17:42 +01:00
Fomafix 05f15dc79f Merge "Use Html::hidden instead of Xml::element" 2021-11-07 17:46:29 +00:00
jenkins-bot c0967dbe3a Merge "Don't add logging-related form inputs if not required" 2021-11-07 13:55:27 +00:00
Fomafix 758d0fb84a Use Html::hidden instead of Xml::element
This change replaces in the HTML

 <input type="hidden" name="wikieditorJavascriptSupport" id="wikieditorJavascriptSupport" value="" />

by

 <input id="wikieditorJavascriptSupport" type="hidden" name="wikieditorJavascriptSupport"/>

but the behavior is still the same.

Change-Id: Icc9b9c9480be3b220148466d3f93746e14de280a
2021-11-05 18:18:35 +00:00
Fomafix fae34607a7 Replace WebRequest::getVal by WebRequest::getRawVal
The UTF-8 normalization of getVal is not needed here.

Also explicit check for !== null instead of truthy because in PHP is
"0" != true.

Change-Id: I77a8a2c149045f677ff2a1f0e42d9ca9dccde321
2021-11-05 17:57:52 +00:00
Sam Wilson d23389cd06 Avoid User::getEditCount() and ::getOption()
The latter is deprecated, and the former is just a wrapper for
UserEditTracker::getUserEditCount().

Bug: T290521
Change-Id: Id3f2b9a007fe299d74d5957cbd3e31b11adb2790
2021-11-05 11:52:00 +08:00
Sam Wilson a2cccc57af Add live-preview logging
Log on every click (by any means, including accesskey) of the
main editing preview button.

Bug: T290521
Change-Id: I67d821445c5e39034bcb121beccf17a765a311ed
2021-11-04 10:09:56 +08:00
Translation updater bot d5175e8695 Localisation updates from https://translatewiki.net.
Change-Id: I8d58d90d344aca367b249764250f277d71bab7cb
2021-11-03 08:21:33 +01:00
Sam Wilson b980affad6 Don't add logging-related form inputs if not required
Change-Id: I71d7f9b741cb60d0bbb8f0fbd6e8ac0967ee1492
2021-11-03 13:40:19 +08:00
jenkins-bot 4e17f5a5d8 Merge "Fix excluded phpcs rules" 2021-11-02 14:14:45 +00:00
Translation updater bot 819297f7d8 Localisation updates from https://translatewiki.net.
Change-Id: I192be2b12cdf34d6a6f243ec048d25d63f54affe
2021-11-02 08:07:44 +01:00
Sam Wilson 0744773321 Fix excluded phpcs rules
Change-Id: Ie0d0a00e2a12dc50bd2ed9ba00b8e7f339227a56
2021-11-02 13:48:27 +08:00
Translation updater bot 10a35cc513 Localisation updates from https://translatewiki.net.
Change-Id: I2ebd4029ed1f20b522c8b325a0455a3793dce19f
2021-11-01 09:34:55 +01:00
Translation updater bot fc5d8708cf Localisation updates from https://translatewiki.net.
Change-Id: I6c506371e0d864b1f4f14ef91edc0bf46fa6b38c
2021-10-29 08:22:35 +02:00
Translation updater bot 7611a9b993 Localisation updates from https://translatewiki.net.
Change-Id: Ia338b091f70850b49143b728c1484495042f99c4
2021-10-26 08:18:20 +02:00
Translation updater bot 4b1ce7c6ca Localisation updates from https://translatewiki.net.
Change-Id: I45c9c0465ef3fc76f4eb234caeac3f0714d944ca
2021-10-25 08:52:57 +02:00
libraryupgrader 1b5449e6a3 build: Updating mediawiki/mediawiki-codesniffer to 38.0.0
Change-Id: Iac78325ade4c685a338df86306fa47c3b79c2fd4
2021-10-24 15:59:59 +00:00
Translation updater bot b0680dbca7 Localisation updates from https://translatewiki.net.
Change-Id: If95dcfd26b1e8cf400862f666792de84ad2147c9
2021-10-21 08:22:56 +02:00
Translation updater bot b45e353b10 Localisation updates from https://translatewiki.net.
Change-Id: I9927c7aa7376b74fa633e714ea3e54f0cee293a5
2021-10-20 08:38:08 +02:00
Translation updater bot 7cae6b916a Localisation updates from https://translatewiki.net.
Change-Id: I778e3410ecca747bcbe2c2df704757f2e188719b
2021-10-18 15:21:46 +02:00
jenkins-bot 3bcaa37303 Merge "Remove template for insert-link dialog" 2021-10-13 20:20:30 +00:00
jenkins-bot 97780d5e3e Merge "Remove 'resize' logic from jQuery UI dialogs" 2021-10-13 18:59:15 +00:00
Sam Wilson 54f3e15199 Remove out-of-date CSS
* #wikieditor-toolbar-link-int-text was removed in I17f34a8cbf72b80f3916581867e5828d9b129789
* .wikiEditor-template-dialog-fields was removed in I47119d6cfdde4b40ff5b07be0c7d327b80598142

Change-Id: If669eb3fa8e1401d640c879f808c097682c30f31
2021-10-13 11:03:32 +08:00
Sam Wilson 60be1db1d1 Remove template for insert-link dialog
The HTML template is no longer required, as all three fields are
now OOUI and so provide their own HTML.

Bug: T289214
Change-Id: Id7e02119f00e30244b8dc2048c1f694500151b25
2021-10-13 10:03:44 +08:00
Daimona Eaytoy 834632650d Remove 'resize' logic from jQuery UI dialogs
Added in https://phabricator.wikimedia.org/rSVN56198 in 2009

It seems to have no user-visible effect, and resizing is still working
as expected for the dialogs that use it.

OTOH, this logic is broken, since it doesn't account for elements hidden
via classes or anything other than inline style. For instance, if there
are OOUI text fields inside the dialog, the logic in resize() will add

  style="display:inline"

to the empty icon elements, which would then cover part of the input
field.

Bug: T293065
Change-Id: If53937dd9e80835774ef936c5aa19f78c7266ca7
2021-10-12 11:46:21 +02:00
Sam Wilson 0b14ae0666 Change insert-link radio buttons to OOUI
Add new OOUI field for the link-type radio buttons in the
insert-link dialog.

Bug: T289214
Change-Id: Idf80c533e5a17de3e9a57051c0608524b6d45098
2021-10-12 13:01:26 +08:00
Sam Wilson e3e9ebb6cb Change the (insert-link) title field to OOUI
Following-up on I9fb7e66bf925eb9a8260d6245d2a7db54a7a2fec
this converts the link-text field to OOUI.

Bug: T289214
Change-Id: I17f34a8cbf72b80f3916581867e5828d9b129789
2021-10-11 14:45:02 +00:00
Amir E. Aharoni 675dfe18c6 Fix comma splice in a message
Change-Id: Ia851143a4febdcc2d520214d52c9514f932b9dbf
2021-10-09 14:55:43 +03:00
libraryupgrader efb1157ff8 build: Updating ansi-regex to 5.0.1
* https://npmjs.com/advisories/1002401 (CVE-2021-3807)

Change-Id: I54be830d2119b232f59045bfb2b87dfe321a303c
2021-10-09 09:07:37 +00:00
jenkins-bot c3d4bfcd2e Merge "Allow a free-text string 'title' field when adding characters" 2021-10-08 22:24:07 +00:00
Sam Wilson 6384498d75 Switch to OOUI TitleInputWidget for the link-inserter
In order to get a better look-up experience (images, description,
redirects, and disambigutation pages listed last), swich from
a custom title-autocomplete input (that used jquery.suggestions)
to OOUI's standard one (which is used in a bunch of other places
in MediaWiki).

This means a fair bit of code can be deleted from
jquery.wikiEditor.dialogs.config.js, and some of it moved to
the new OOUI classes.

This patch aims to be the minimum required, and so leaves a few
things for subsequent patches (such as converting the other parts
of the insert-link dialog to OOUI).

Bug: T289214
Change-Id: I9fb7e66bf925eb9a8260d6245d2a7db54a7a2fec
2021-10-08 12:43:55 +00:00
Translation updater bot 4023b7af82 Localisation updates from https://translatewiki.net.
Change-Id: I8901d598a51327a719d64d0b466f23f6767456f5
2021-10-05 08:30:14 +02:00