Commit graph

83 commits

Author SHA1 Message Date
Umherirrender 3e8f5e7142 Use new namespace for MediaWiki\Revision\SlotRecord
MediaWiki\Storage is alias since 1.35

Change-Id: I81f4f238282a11fba47fe0d49566c68ac47dffc5
2022-02-26 22:16:25 +01:00
sahajsk e2b9df0edd Display correct error message when no page is found and category is empty
Change-Id: I0557c2c8e622cbdc4f563ea6f1b314a946271847
2022-02-25 19:18:46 +05:30
sahajsk 69db621a7d Mark edits as patrolled by default if user has permission
Change-Id: Idceb01e51f1caec4b1f2d5def8340c4bdb7ef913
2022-02-22 00:50:15 +00:00
Yaron Koren 9a2218cbb4 Change newline to line break character in search context as well
Change-Id: I4d70761ec3ab1fadb445a3a44eed60a7eb875195
2022-02-16 15:32:56 +00:00
sahajsk 11a2818cef Display newline character as arrow symbol in target string
Change-Id: Iccddd19d708d89a43ea97320b95af9f513ddd73a
2022-02-16 13:55:18 +00:00
Umherirrender 4ac856579e build: Remove unneeded phan suppression
Bug: T290624
Change-Id: I14e321cbc91c407c982b3c410cb2dae84afecb01
2022-02-12 01:01:38 +01:00
sahajsk a092b2a7d7 Display correct error message when no page is found and category is empty
Change-Id: I2a3bf92ceb0fc9555b66325b569a0b2077d56789
2022-02-10 06:33:29 +05:30
sahajsk 47c26d6746 Display error message when no page is found and category does not exist
Change-Id: I1cb6ce5d96285222ee45a6cf9016c38eaa03fd24
2022-02-06 05:05:35 +00:00
sahajsk b2bc62537f Fix "Notice : Undefined offset: 1" after replacement
Change-Id: If98ce127db68aab129595b0418f912f8be8ee963
2022-01-26 02:07:32 +00:00
Umherirrender 642e702375 Replace deprecated JobQueueGroup::singleton()
Change-Id: I0cc14778bc59764edd6a293ae218e1a33b57d2bb
2022-01-24 20:25:58 +01:00
Yaron Koren a49f7e1855 Make form URLs relative (local) instead of absolute
Change-Id: I19fc531959480567fdf19e17022b4ecf42e2e685
2021-12-02 20:46:33 +00:00
Marijn van Wezel ed9c752309
Add support for slots other than 'main'
This commit adds support for replacing text in multiple content slots.
The names of all the slots that contain the target string are shown on
the special page, and the user can select or deselect which slots they
want to edit. Edits to different slots for the same page are bundled
into a multi-content revision.

If a replace is performed through the 'replaceAll.php' maintenance
script, all slots are taken into account.

Change-Id: Ic4f36fa76e1eaeac8200c60f196c53c2ed78fa45
2021-11-24 15:40:11 +01:00
Cindy Cicalese ffce14c547 Replace deprecated WikiPage::doEditContent
Bug: T293737
Change-Id: Icfac41ca54bf2cd59847b095c3f309b7d3eacb21
2021-10-19 13:26:39 -04:00
Umherirrender f8f8dfca4a Use MovePageFactory to instance MovePage
Constructor is deprecated
MovePageFactory since 1.35

Change-Id: Iefec53267f6ed4a179f537adb67d744b3b47ea2b
2021-10-14 20:39:58 +02:00
jenkins-bot 4a0a3e9c5d Merge "Avoid using MWNamespace" 2021-10-08 23:23:09 +00:00
libraryupgrader 4f90bb0735 build: Updating ansi-regex to 5.0.1
* https://npmjs.com/advisories/5197 (CVE-2021-3807)

Additional changes:
* composer.json: Updated phpcs command in composer test (T280592).
* composer.json: Added phpcs command to scripts (T280592).

Change-Id: I96dca296476847a677ddd411db8553b78d5409d0
2021-10-05 21:53:19 +00: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
RhinosF1 4c1453927d SECURITY: Check permissions before job execution
CVE-2021-41801

Bug: T279090
Change-Id: Ibc299edf626ca9aa1cd9d83b888820f5aca9af7c
2021-09-30 16:41:41 +01: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 78e75ed030 Change CSS identifiers
Apply CSS coding conventions from:
https://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS#Naming

* Use class instead of id.
* Use class names with the prefix "ext-replacetext-".
* Remove stylelint rule:
    "selector-max-id": null
* Add stylelint rule:
    "selector-class-pattern": "^client-nojs$|^ext-replacetext-"

Change-Id: Ia7e3d41030aba7287716a219acbe6115e8fcbe46
2021-09-08 11:53:43 +00:00
Fomafix 2a6d1866fd Duplicate styles from 'mediawiki.special.search.styles'
The styles for #mw-searchoptions are currently missing on
Special:ReplaceText.

Also duplicate the style for .searchmatch to avoid the dependency on
core module 'mediawiki.special.search.styles'.

Change-Id: I846bae65fc87ba300b78932a9704ba6b639643c0
2021-09-07 20:36:32 -07:00
Fomafix db88090ca6 Generate toggle buttons in HTML instead of JavaScript
This change ensures that the toggle buttons are already present while
loading.

Change-Id: I9453de8e540a75436029a3383721d0b6d73786ae
2021-09-07 20:33:39 -07:00
Yaron Koren 7c5dfae496 Change some interface elements to use OOUI
Change-Id: Ic55f2b173948aad50ae24279b630315ecf8faf1c
2021-07-08 18:16:20 +00:00
Fomafix 97aa6a9efe Remove support for MediaWiki 1.30
The extension already requires MediaWiki >= 1.32 in extension.json.

Change-Id: I80f624057609e6e2bbe6ac44ece4d4085a12c3d4
2021-07-03 09:15:47 +00:00
Umherirrender 22b1fc0725 Remove MSSQL support
Bug: T283021
Change-Id: I27a55958cb8bb25cf6dafbc4dcd4054113bb5fd8
2021-06-07 19:29:29 +00:00
Umherirrender 0a73008353 Fix mysql specifc cast on signed with Database::buildIntegerCast
Bug: T280102
Follow-Up: Ia84f135a8699fdc6cff6877c31fae1d46bf84f97
Change-Id: Ie8fc9fd8080e552c0b466472431e2c7143f8c7b0
2021-05-16 22:12:33 +02: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
Cindy Cicalese 84c803f93f Replace usage of deprecated WatchAction methods
Bug: T280750
Change-Id: Ie9a25eb62358329d403d3b54bd0f84c773ca7e48
2021-04-28 09:00:12 -04:00
Mark A. Hershberger eb73831c19
Move to MW\Extension namespace
Change-Id: I8f96ef2fd787a516d71a4391d812ede3cbbb30d4
2021-04-09 13:12:48 -04:00
Mark A. Hershberger 4538d0dc23
Make configuration errors translatable
And use an ErrorPageException to display them

Change-Id: Icbec6f40610b5f2fc51fdf5d1b55a153f5158cc0
2021-04-09 12:12:52 -04:00
Yaron Koren d0788608e9 Another fix for 7f823dfccb - restore support for SQLite
Patch by Shouya0.

Change-Id: Ibae73e57d036031f1bfc8df17205ca1359f0dd67
2021-04-06 16:37:07 +00:00
Umherirrender 85969b01e2 build: Swap deprecated @codingStandardsIgnore to phpcs:ignore
Bug: T278594
Change-Id: I42c60bcfb58c863dc37735258422e3307ed33dad
2021-04-04 00:00:48 +02:00
Mark A. Hershberger 87ae0875be
Check that $matches[0] is actually an array
Bug: T279148
Change-Id: I687e07f2ce6d9574d7eef0442a6968321368fb19
2021-04-02 10:55:29 -04:00
Umherirrender 61c3c9daee Swap condition to avoid "yoda condition"
Change-Id: I749570a60dd047e5dbe9a71fbbdbfa52e83584d8
2021-01-06 23:42:51 +01:00
libraryupgrader e623b8e8a0 build: Updating mediawiki/mediawiki-phan-config to 0.10.6
Change-Id: Ic9ce791f7f206839c170e507dbc0850d734692a4
2020-12-29 22:18:19 +00:00
James D. Forrester 580d8c1529 Follow-up d6492afd: Drop pre-1.32 back-compatibility code
Change-Id: I9ea4ad3f6cc1343560b5d7e753d34adcde95429e
2020-12-22 09:07:36 -08:00
James D. Forrester 0aa189009c Drop use of wgContLang, deprecated in 1.32
Change-Id: Ib7fe7318100c0aadc3aa759416bf787913a9b788
2020-12-22 08:48:38 -08:00
AniLeo 286c538e6f Fix MySQL invalid syntax regression from bcd6b2f7
Casting "AS INTEGER" is not valid MySQL syntax. You have to cast "AS
SIGNED" or "AS UNSIGNED".

Change-Id: Ia84f135a8699fdc6cff6877c31fae1d46bf84f97
2020-11-30 17:37:16 +00:00
libraryupgrader d28651c59e build: Updating mediawiki/mediawiki-phan-config to 0.10.4
Change-Id: I708699bdd60488688cdd06f541e03b54b8d68c01
2020-11-20 14:59:17 +00:00
libraryupgrader 8f054de250 build: Updating mediawiki/mediawiki-codesniffer to 33.0.0
The following sniffs are failing and were disabled:
* Generic.ControlStructures.DisallowYodaConditions.Found
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate
* MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage
* MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage

Additional changes:
* Dropped .inc files from .phpcs.xml (T200956).
* Added the `wikimedia/mediawiki` profile in .eslintrc.json (T262222).
* Added the `wikimedia/jquery` profile in .eslintrc.json (T262222).
* Removed global `$`, included in the `wikimedia/jquery` profile (T262222).
* Removed global `mw`, included via `wikimedia/mediawiki` profile (T262222).
* Dropped the emtpy global definition in .eslintrc.json.

Change-Id: I4ace90c3162ca94e401d80d9d68f278c6a2e9960
2020-11-04 16:53:49 +00:00
Yaron Koren bcd6b2f732 Fix for 7f823dfccb - restore support for PostgreSQL
Change-Id: I7de2461fd7e99ce53d5d2cebfe965123c91fbdae
2020-06-05 12:43:55 +00:00
libraryupgrader 69b926a604 build: Updating mediawiki/mediawiki-phan-config to 0.10.2
Additional changes:
* Removed phan-taint-check-plugin from extra, now inherited from mediawiki-phan-config.

Change-Id: I6748d2720884b7059224e614d686fd3a72d23202
2020-06-02 20:22:06 +00:00
libraryupgrader 27ffe1f801 build: Updating mediawiki/mediawiki-codesniffer to 31.0.0
The following sniffs now pass and were enabled:
* PSR12.Files.ImportStatement.LeadingSlash

Additional changes:
* Replaced "jakub-onderka" packages with "php-parallel-lint".

Change-Id: I6bcf27f48c26d9e130dbd1ee77bd3badb31805d5
2020-05-30 05:49:00 +00:00
DannyS712 66853b88db Replace uses of old deprecated SpecialPageFactory
Extension requires 1.32+, so version isn't an issue

Bug: T246142
Change-Id: I5642d3781af5b366389f3fc4fc359989f6f9dbd8
2020-02-28 23:49:35 +00:00
libraryupgrader e436c9ca32 build: Updating composer dependencies
* jakub-onderka/php-console-highlighter: 0.3.2 → 0.4.0
* mediawiki/minus-x: 0.3.2 → 1.0.0
* mediawiki/mediawiki-phan-config: 0.9.0 → 0.9.2

Change-Id: If64306a1352d3daed53b097d5f02457e8b7a2288
2020-02-19 19:52:51 +00:00
jenkins-bot 712bca0ff6 Merge "Unhardcode the limit "find no more than 250 results" in doSearchQuery()" 2020-01-15 12:33:36 +00:00
libraryupgrader d3479f8ca2 build: Updating mediawiki/mediawiki-codesniffer to 29.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate

Change-Id: I48607226707fcc6c30a194e741d367ddd0c2f27b
2020-01-14 19:37:04 +00:00
Edward Chernenko b7cf9f4b09 Unhardcode the limit "find no more than 250 results" in doSearchQuery()
Here we add $wgReplaceTextResultsLimit variable (default: 250) to allow
administrator to change this limit.

Change-Id: Iee9d958db8ddd245a98ec6a3d5b5cf8ef1d80370
2020-01-10 02:20:08 +00:00
libraryupgrader 3fe88580cb build: Updating mediawiki/mediawiki-phan-config to 0.9.0
Depends-On: I76cbaf355462a41aec40d239577123de6b04223a
Change-Id: I7780d46c2828947cf753ea2390d3b1dd645b6758
2019-12-28 19:05:28 +00: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