Commit graph

43 commits

Author SHA1 Message Date
Umherirrender 116ead6d4f Add missing documentation to class properties
Change-Id: Icdcaa4c34d512c2058fa0d0e349a2cca2ca2e543
2024-08-20 23:46:51 +02:00
Umherirrender 3cb17f95da Removed unused $titles property from ReplaceAll
Change-Id: I2081720011db24bb7bf3913134be5eecbfb4398e
2024-08-20 23:45:49 +02:00
Fomafix 7edb3c9670 Inject services in Job
Change-Id: Ib60ad4128eb93eb7ac02e4e8f54af0c57ce4e296
2024-03-26 20:29:44 +00: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
Fomafix 1a11358d7d Inject services into Search
Change-Id: Ied8ff046835ee66f66121b1ceb0cf34d6739cd81
2024-02-11 14:40:48 +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
Mark A. Hershberger 0dcd7c769c Remove shebang
Bug: T352680
Change-Id: Ica661d3fec81cd39812dce8f092e6c24d3e91224
2023-12-04 23:19:04 +00:00
jenkins-bot 2a01eaafd8 Merge "Remove hard coded $wgShowExceptionDetails = true;" 2023-10-20 15:05:33 +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
TechieNK c0c2d6e2e1 Add Page number limit option
Bug: T45472
Change-Id: I66812d8c0a12c0bd0362c2068f88cb6e26005d2c
2023-09-20 23:52:46 +05:30
Umherirrender 2185037fc9 Create HookRunner class and the hook handler interfaces
Rename existing HookRunner to HookHelper and create a new class
HookRunner using the name described in core's Hooks.md

Bug: T271025
Change-Id: I85e828226d3d259f93ab2a4eb29dd1fe535abc30
2023-08-15 22:40:53 +02:00
Yaron Koren e1da9e2d63 Replace "Announce changes" option with (inverse) "Mark as bot"
Bug: T200334
Change-Id: I5b588e0dda95812543b270fbc5aece14a5583c83
2023-08-08 16:13:07 +00:00
Abijeet 986b51e5a2 Add ReplaceTextFilterPageTitlesForRename hook to avoid pages to rename
Allows other extensions to specify pages that should not be renamed.

Bug: T313148
Change-Id: I47b4549b90fe30be7a80e74db60d16be6776e7f6
2023-06-15 13:13:30 +00:00
Abijeet f7a6474c72 Add ReplaceTextFilterPageTitlesForEdit hook to avoid pages for edit
Allows other extensions to specify pages titles that should not be
edited.

Bug: T313148
Change-Id: Ia3d8e99fc6a478c1df5064fae44ad8558c968725
2023-06-15 02:25:18 +00:00
Yaron Koren 9c1cb9d568 Fix manual setting of summary in replaceAll.php
Bug: T224863
Change-Id: I50a873084b7ebf3bc95d3da707ff262868592c22
2023-06-07 13:59:35 +00:00
jenkins-bot 4ec204fc3f Merge "Use single quotes instead of double quotes in PHP" 2022-11-17 20:10:31 +00:00
Fomafix 19c2bf2920 Simplify loops over array_keys
Use native PHP feature of iterating over key-value pairs
instead of looking up the value if it's used.

Change-Id: I620add5f0f919923518557047773e5fff90827cf
2022-10-23 10:31:07 +00:00
Fomafix 836defe8fa Merge "Use \t instead of TAB in the string" 2022-09-12 19:23:47 +00:00
Fomafix 3b6a6802bd Use \t instead of TAB in the string
Change-Id: Ia2052d7ca3f80d0e54ce4a3923f2373c39e7620d
Depends-On: I19c1b42d9a7c76baacfad2632c4f5525532366a9
2022-09-12 19:21:30 +00:00
Fomafix c7d80d1938 Use https://www.gnu.org/ instead of http://www.gnu.org/
Change-Id: I8aa4b4a8ba78fb9268021a3ddeb5e2a9c7b0cfeb
Depends-On: I19c1b42d9a7c76baacfad2632c4f5525532366a9
2022-09-12 19:13:23 +00:00
Fomafix 59f9bc6974 Use single quotes instead of double quotes in PHP
Change-Id: I0f05a6ffbf78a6f8150c9ef751bf92f5d7956fe3
2022-09-08 16:36:16 +00:00
Fomafix bca8b58017 replaceAll.php: Allow empty values as target
This change allows to execute the following command with an empty
replacement string:

	php maintenance/replaceAll.php 'FooBar' ''

Bug: T293120
Change-Id: I5d8f223f6edae771ca3cd7c68aae741f3fa64350
2022-09-08 12:11:58 +00:00
jenkins-bot 40b79328da Merge "Use UserFactory::newFromId() and ::newFromName() instead of User::newFromId() and ::newFromName()" 2022-09-08 10:29:50 +00:00
Yaron Koren 9329d7ea56 Add long-missing category, prefix flags to replaceAll.php
Change-Id: I81b83c408094767f337581cf79c3c005e9486560
2022-08-11 23:25:03 +00:00
RazeSoldier 61ac0b0e7c Use UserFactory::newFromId() and ::newFromName() instead of User::newFromId() and ::newFromName()
User: :newFromId() and ::newFromName() has been deprecated in 1.36.

Bug: T294128
Change-Id: Id872c28c7d20dc3d27a74cfac608aeb911c87c3d
2021-10-22 22:57:26 +08:00
Alexander Vorwerk a4997109ea Avoid using MWNamespace
The MWNamespace class has been deprecated in favor of the NamespaceInfo
service. All methods in the MWNamespace should be replaced with the
equivalent methods of the NamespaceInfo service.

Bug: T291389
Change-Id: I9e3a0aff012d1524205cebe61c10e016f989cecb
2021-10-01 15:51:09 +02:00
libraryupgrader a765c687c9 build: Updating composer dependencies
* mediawiki/mediawiki-phan-config: 0.10.6 → 0.11.0
* php-parallel-lint/php-parallel-lint: 1.3.0 → 1.3.1

Change-Id: I33ceb173eb7775833a00dd4ae1761df5e4a4c4d0
2021-09-09 18:43:17 +00:00
Fomafix 1d8693829b Remove backwards compatible code for MediaWiki < 1.28
Extension already requires 1.32+ in extension.json

Change-Id: I76005515ca2dbf367cfc13ab5db8ee7c51bb11cb
2021-07-06 23:46:16 +00:00
libraryupgrader 756212a5c8 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

npm:
* grunt: 1.3.0 → 1.4.0
* lodash: 4.17.19 → 4.17.21
  * https://npmjs.com/advisories/1673 (CVE-2021-23337)
* hosted-git-info: 3.0.7 → 3.0.8
  * https://npmjs.com/advisories/1677 (CVE-2021-23362)
* postcss: 7.0.35 → 8.2.15
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)

Change-Id: Ie63a64b73266230d2805383625fbca576d1be83b
2021-05-13 05:12:32 +00:00
Mark A. Hershberger eb73831c19
Move to MW\Extension namespace
Change-Id: I8f96ef2fd787a516d71a4391d812ede3cbbb30d4
2021-04-09 13:12:48 -04:00
Umherirrender 85969b01e2 build: Swap deprecated @codingStandardsIgnore to phpcs:ignore
Bug: T278594
Change-Id: I42c60bcfb58c863dc37735258422e3307ed33dad
2021-04-04 00:00:48 +02:00
Umherirrender 2fb5c57fba Remove unneeded break after throw
Change-Id: Ief0dd9ecbf62ab84a3e504634eff4a236c115691
2021-01-06 00:21:50 +01:00
Reedy 7d4e871037 Use $this->output() rather than echo
Change-Id: I25c6abcce573ed3ad0884eb4ad21522c8f4d9d85
2020-03-31 22:26:49 +00:00
Umherirrender 750738cc23 Avoid deprecated param on Maintenance::error
Use Maintenance::fatalError instead

Change-Id: I76cbaf355462a41aec40d239577123de6b04223a
2019-12-28 19:37:40 +01:00
Umherirrender dab839001a build: Updating mediawiki/mediawiki-phan-config to 0.8.0
Bug: T235049
Change-Id: I752c89cd13ecc55cbbcbe9c3b94c862c096daf87
2019-11-06 20:02:54 +01:00
Umherirrender f98647f62c Use Maintenance::addDescription
It is better to use a setter function than setting a property

Change-Id: Idc5985e0fa4e773687bcd829e21259cee3045939
2019-08-19 20:33:06 +02:00
libraryupgrader 73843895f6 build: Updating mediawiki/mediawiki-phan-config to 0.5.0
Change-Id: I6132f22888b2e63087d9b47fbde2bf5872b87b5b
2019-03-10 22:24:02 -07:00
Niklas Laxström 19da42d081 Support renaming pages from CLI
Change-Id: I3e14d127cdf63ad4bbff9fcc0a165cc1a0552831
2018-09-07 14:29:58 +02:00
libraryupgrader 6adf0a0712 build: Updating mediawiki/mediawiki-codesniffer to 22.0.0
The following sniffs are failing and were disabled:
* Squiz.PHP.NonExecutableCode.Unreachable

Change-Id: Ifa593af5d3fb2aa38dea9f73e903a2fb27d1d6e6
2018-09-03 14:30:30 +00:00
Cindy Cicalese f7b59db9b3 Fix path to maintenance directory.
Change-Id: Ife7a7076ee87938cadb84aa56982cc667bd90e2f
2018-05-16 12:43:54 +00:00
Kunal Mehta 2beae377e7 Move replaceAll.php into maintenance/
And fix an issue that phan found.

Change-Id: I91cb562ac674b02bb84c6c1da4236810f6a3aa3c
2018-05-03 13:08:15 -07:00