Commit graph

1296 commits

Author SHA1 Message Date
Timo Tijhof 3a6f634385 SpecialReplaceText: Migrate deprecated Xml usage to Html class
```
Xml::textarea( $name, $content, $cols = 40, $rows = 5, $attribs );

Xml::input( $name, $size = false, $value = false, $attribs );

Xml::checkLabel( $label, $name, $id, $checked = false, $attribs );
```

For examples of trouble with Xml::checkLabel, see also I61c8f67127 in
CentralAuth and I33bf6ab5e0 in MediaWiki core. For improved clarify,
I'm replacing most of these with Html::element().

While at it, I'm also migrating `<input id=…><label for=…>…</label>`
to the simpler `<label><input>…</label>` form where this is easy to
do.

ext.ReplaceTextStyles.less has styles for label/input inside
`.ext-replacetext-search-togglebox`, which this patch leaves unchanged.

ext.ReplaceText.js refers to the IDs of namespace checkboxes,
which this change keeps in-tact. In the future, the namespace
checkbox HTML could be simplified further if the JS code selects by
`name` instead of `id`.

Test Plan:
* Given `wfLoadExtension('ReplaceText');` in LocalSettings.php,
  and a Main_Page containing the word "installed".
* View Special:ReplaceText, verify it renders without errors,
  and each label is click-associated with its checkbox.
* Find "Main", Replace "Minor",
  tick "(Main)" namespace, tick "Replace text in page titles".
* Continue
* Verify the checkboxes under "For moved pages:" are also
  associated with their labels.

Change-Id: I2060961115b7af23dcf086ed03bfa3f159f5302c
2024-03-27 03:07:52 +00:00
Fomafix 7edb3c9670 Inject services in Job
Change-Id: Ib60ad4128eb93eb7ac02e4e8f54af0c57ce4e296
2024-03-26 20:29:44 +00:00
Umherirrender 030fb699f7 Type hint IReadableDatabase in Search
Follow-up: I01a1aa0ddbc756226d8e3404ac1cc3350ad5df64
Change-Id: Ifef8867aa2583cf65115b4764f9cceae296161bc
2024-03-25 23:59:48 +01:00
Fomafix fe94aa9e2e Use variable to avoid multiple calls of $this->getServiceContainer()
Change-Id: If8ace28a7061e440801f0fea1925e294fa4e6b90
2024-03-16 11:32:30 +00:00
Umherirrender dfdbb1d686 build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0
Change-Id: Iddcde8e23176b699f886ff7901bfaa354f6e3a69
2024-03-11 22:44:51 +01:00
Yaron Koren 863966a81b Change main zh-hans alias for Special:ReplaceText
Bug: T359749
Change-Id: Icfcf75fa33d6fd4da38326738d92ed24185fd8b1
2024-03-11 17:40:41 +00:00
Fomafix 1a11358d7d Inject services into Search
Change-Id: Ied8ff046835ee66f66121b1ceb0cf34d6739cd81
2024-02-11 14:40:48 +00:00
Fomafix 3d299a548f Replace global variables in Search
Change-Id: I1dfbe55be5b93a829a3a9ab98ed703ec2213d008
2024-02-11 14:39:43 +00:00
libraryupgrader 082686abe4 build: Updating dependencies
composer:
* mediawiki/mediawiki-phan-config: 0.12.1 → 0.14.0

npm:
* grunt-banana-checker: 0.11.0 → 0.11.1

Change-Id: Ib6b54f76834223f662a20bcdd4bbeb3340806696
2024-02-10 14:05:18 +00:00
libraryupgrader 9aeab9747a build: Updating eslint-config-wikimedia to 0.26.0
Change-Id: I5b55c971ca1606b58194746a3378f9afcb899391
2024-02-09 12:01:15 +00:00
libraryupgrader 4e52b32797 build: Updating npm dependencies
* grunt-eslint: 24.0.1 → 24.3.0
* grunt-stylelint: 0.18.0 → 0.19.0
* stylelint-config-wikimedia: 0.15.0 → 0.16.1

Change-Id: I5226d242f8a14bbba6022959cf66ce21e8f39bea
2024-02-07 22:27:04 +00:00
Translation updater bot e5d1e03ef3 Localisation updates from https://translatewiki.net.
Change-Id: Iac0792abb316738a3c066740dae18fec352ace1e
2024-02-07 08:27:30 +01:00
libraryupgrader ec60840461 build: Updating npm dependencies
* eslint-plugin-compat: 4.1.2 → 4.2.0
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
* postcss: 8.4.19 → 8.4.33
  * https://github.com/advisories/GHSA-7fh5-64p2-3v2j
* semver: 7.3.8 → 7.5.4
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
* word-wrap: 1.2.3 → 1.2.5
  * https://github.com/advisories/GHSA-j8xg-fqg3-53r7

Change-Id: I1bc286b57e381cc9678cf547d16ca6234f61fb18
2024-02-04 10:00:39 +00:00
Translation updater bot 4e6ba71e15 Localisation updates from https://translatewiki.net.
Change-Id: I2efdebc90ac63b3b0402329d97a347f1ed543028
2024-01-28 16:07:57 +01:00
jenkins-bot bce8f7501f Merge "Fix user existence problem" 2024-01-11 18:08:15 +00:00
TechieNK 6a484ebd0a Fix user existence problem
Bug: T307069
Change-Id: I4ae3902d88470d9aad434ebc0a87d1e586a54758
2024-01-11 18:02:24 +00:00
Translation updater bot 8bcb3df34b Localisation updates from https://translatewiki.net.
Change-Id: Ia1890f36b85fa5c9e8527fbbbd9aafc17eaa0dc5
2024-01-10 08:33:21 +01:00
jenkins-bot 0480d83b71 Merge "Quote delimiter in target text when using regular expressions" 2024-01-08 15:55:20 +00:00
Mark A. Hershberger e9a086c4ee
Quote delimiter in target text when using regular expressions
bug: T354498
Change-Id: I0bafbaa4cfb55e2d65712a747a2622b159417dea
2024-01-07 21:24:09 -05:00
jenkins-bot e8c50add4e Merge "replaceAll.php: Replace get_class with instanceof" 2024-01-06 00:36:24 +00:00
Umherirrender a14f9f6b5b replaceAll.php: Replace get_class with instanceof
The User class was namespaced in 1d0b7ae1,
checking class names as string is broken, use instanceof.
There are no subclasses of User class to ignore at this point.

Also use User::getName instead of implicit User::__toString

Change-Id: I8b9f73609a7ef9f781c8a5ae27e00d612d33ee4f
2024-01-05 21:26:44 +01:00
Umherirrender 48144bb804 Use namespaced classes
This requires 1.42 for some new names

Change-Id: I7f2e4271ddb42fa449252a66d3c973ad7669575e
2024-01-05 21:23:04 +01:00
Translation updater bot 464311b4bc Localisation updates from https://translatewiki.net.
Change-Id: Ibc0ba7a8e48a49851bdf9b90ea27b103e77d27bc
2024-01-02 10:17:17 +01:00
Mark A. Hershberger 0dcd7c769c Remove shebang
Bug: T352680
Change-Id: Ica661d3fec81cd39812dce8f092e6c24d3e91224
2023-12-04 23:19:04 +00:00
Translation updater bot 475ad71b4c Localisation updates from https://translatewiki.net.
Change-Id: I036a909c479d0fbece1f3338443e5fd18b3a5ff1
2023-11-29 08:31:41 +01:00
Translation updater bot a6d163ae4f Localisation updates from https://translatewiki.net.
Change-Id: I2f197ca1376e04d7b7d8b3e4c4302fe5ee751735
2023-11-22 08:20:36 +01:00
Translation updater bot f41e9de4ff Localisation updates from https://translatewiki.net.
Change-Id: I1015a35e25b30a457593b6633302e5004407733d
2023-11-07 09:08:36 +01:00
jenkins-bot 1df51466b8 Merge "Replace deprecated User::getEditToken and ::matchEditToken" 2023-10-31 15:21:38 +00:00
Fomafix 192435154e Use user interface instead of content language for RTL flipping
The CSS get automatically flipped on RTL user interface language.

Change-Id: I472c0fbbdaf20bd5cb3ad55d1194c99fc72ffdba
2023-10-21 13:42:18 +00:00
jenkins-bot e029f1b13a Merge "Use single quotes instead of double quotes" 2023-10-20 15:37:42 +00:00
jenkins-bot 2a01eaafd8 Merge "Remove hard coded $wgShowExceptionDetails = true;" 2023-10-20 15:05:33 +00:00
Fomafix 83e425ab5a Use single quotes instead of double quotes
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#String_literals
Single quotes are preferred in all cases where they are equivalent to double quotes.

Change-Id: I808927475e3063a1a37fff9ab851d292acd847bf
2023-10-20 12:26:37 +00:00
Fomafix 2ce2c8d131 Replace deprecated User::getEditToken and ::matchEditToken
Change-Id: If24076c615f5cd41707e21d1497e451b6133e504
2023-10-20 11:17:59 +00:00
Fomafix 0132d19b90 Replace deprecated global function wfGetDB()
Bug: T330641
Change-Id: I3f00c6f3d1c55757275f1542e60a29401786a03e
2023-10-20 08:22:46 +00:00
Fomafix 74c973a2a9 Inject PermissionManager in SpecialReplaceText
Change-Id: Ifdacf22494297698c263c9236d7807eee49b674a
2023-10-20 08:21:58 +00:00
Fomafix f3087681b5 Use namespaced classes
Change-Id: Ie0dbe43c56b7ef6b4514aa7cac1bc2f8b2eace2e
2023-10-20 08:21:44 +00:00
Fomafix 0a0db0d565 Remove hard coded $wgShowExceptionDetails = true;
The DevelopmentSettings enables ShowExceptionDetails. This should be
enough.

Change-Id: I0d82f55146904798b00c5b16a3f09568a2775a96
2023-10-19 06:33:26 +00:00
Fomafix 6811839c39 Use $this->getServiceContainer() in maintenance
Change-Id: I41ba185ca67d57ef8962f548598754edd4688de3
2023-10-18 20:20:20 +00:00
Translation updater bot d77b2257d1 Localisation updates from https://translatewiki.net.
Change-Id: Iaae2f751eefa9db57e0743e77f295e9cac544c37
2023-10-09 08:56:52 +02:00
jenkins-bot 50b2dcd4bc Merge "Add unit test for Search class" 2023-10-02 13:32:34 +00:00
TechieNK ee40a242a4 Add unit test for Search class
Bug: T315764
Change-Id: Ibc5e65bd2bc2ab8d667ead8428a20d3c66f72f99
2023-10-02 13:22:31 +00:00
Translation updater bot 65b85e7eb8 Localisation updates from https://translatewiki.net.
Change-Id: Ie62cc3606fbc3788585c39d770fdd619c98b8fda
2023-09-26 08:44:52 +02:00
Translation updater bot e2d1df7640 Localisation updates from https://translatewiki.net.
Change-Id: Id06e1ee6b976a3c1a59dffe1a012892e9c8b3f32
2023-09-25 08:46:54 +02:00
jenkins-bot c8bf69dd4a Merge "Fix documentation problem" 2023-09-21 16:07:08 +00:00
TechieNK bc85753b87 Fix documentation problem
Change-Id: I5015da83b84b89cd965d97f418a31b0e6116abd3
2023-09-21 20:58:30 +05:30
Translation updater bot 5e2e951fed Localisation updates from https://translatewiki.net.
Change-Id: Ic0098f07a6d0eb8c3793f9223ab9233eec5497b5
2023-09-21 10:16:24 +02:00
TechieNK c0c2d6e2e1 Add Page number limit option
Bug: T45472
Change-Id: I66812d8c0a12c0bd0362c2068f88cb6e26005d2c
2023-09-20 23:52:46 +05:30
Translation updater bot d8f618be5d Localisation updates from https://translatewiki.net.
Change-Id: Ie7e31cba995bdbd1bbf307c9b5e10276026e53dc
2023-09-19 09:26:00 +02:00
Yaron Koren fdc003f058 Version 1.8
Change-Id: I71baf90ba891758623c823d0182526c685c84594
2023-09-07 16:44:16 +00:00
Translation updater bot 504f24c5d0 Localisation updates from https://translatewiki.net.
Change-Id: I31e4f441cb7cb5627f732c870782a27affb452fe
2023-09-06 08:43:00 +02:00