Commit graph

2544 commits

Author SHA1 Message Date
Sam Wilson d96435cd18 Prevent external links from showing as invalid
* When the link target text is changed, only change the URL mode if the user
  hasn't explicitely set the type (internal/external).
* Improve the conditions for the display of the 'external' and 'exists'
  link-target messages.
* Validate the link target (i.e. show messages) not only when the text is
  changed but also when the target type radio is changed.
* Rename the TitleInputWidget.isExternalLink() method to
  looksLikeExternalLink(), to make its purpose clearer.

Bug: T293168
Change-Id: Ie40e8bdebe6f1330fc75ea1861f120e51ad58224
2021-12-06 15:24:04 +08:00
Translation updater bot 6be5553f7d Localisation updates from https://translatewiki.net.
Change-Id: Iaeaf739433db99ad359d684864c10c68c08422e5
2021-12-02 08:42:20 +01:00
jenkins-bot fb1fcfd19e Merge "Add new 'secondary' toolbar section" 2021-12-01 22:45:19 +00:00
Translation updater bot 648a9543b6 Localisation updates from https://translatewiki.net.
Change-Id: I14ae56c0c1d6703e7b31d24d682bd75b497be9f7
2021-12-01 08:15:47 +01:00
Sam Wilson 94569125a7 Add new 'secondary' toolbar section
Add a new top-level section to the right side of the toolbar,
containing a single (empty) 'default' group.

Bug: T296447
Change-Id: If88789f20420f02c729122392e16509bbc5ae7d0
2021-12-01 11:19:41 +08:00
Translation updater bot 987e3d1d04 Localisation updates from https://translatewiki.net.
Change-Id: I404f512972cddff9234f1a3a414109d08644a0ff
2021-11-30 08:22:38 +01:00
Sam Wilson 79a0d3040e Disable link-insert button if target is empty
Set the opening state of the insertion button (in the insert-link
dialog) to disabled, and also disable it whenever the target field
is empty. This makes it unneccessary to show an alert when trying
to insert a blank target so that code is removed.

Bug: T293167
Change-Id: I3541f438fad9b7e0bf23ead2f2e164e84565d254
2021-11-26 12:45:48 +08:00
jenkins-bot 7fbd917c15 Merge "Use HookHandlers, implement hook interfaces and inject services" 2021-11-25 22:02:37 +00:00
Fomafix 0d4d037968 Use HookHandlers, implement hook interfaces and inject services
The static function WikiEditorHooks::editPageShowEditFormInitial is
kept for compatibility because there are usages in other extensions.

Change-Id: I7ba9f56fd3d00d575696f00f9f1c868fa7ad223b
2021-11-25 19:12:16 +00:00
Translation updater bot f3c2a8a35e Localisation updates from https://translatewiki.net.
Change-Id: I1a0d9bbd808f9a2439160b03247cfd19e37164cc
2021-11-25 09:02:52 +01:00
Translation updater bot 6897b9ef58 Localisation updates from https://translatewiki.net.
Change-Id: I508e9ba84579d38918722a3ef2437d57823837db
2021-11-24 08:22:45 +01:00
jenkins-bot e9121b2d1c Merge "Fix bug when target looks like internal link" 2021-11-24 01:49:29 +00:00
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