Commit graph

60 commits

Author SHA1 Message Date
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
Clara Andrew-Wani 7f823dfccb Remove reference to rev_text_id
Bug: T233357
Change-Id: I58559f14c9f732767439da397c22074249f97762
2019-09-20 09:16:18 -04:00
jenkins-bot 32efcacd98 Merge "Replace usage of Title class move methods with MovePage class methods" 2019-08-21 07:17:50 +00:00
jenkins-bot 20ee6e81b4 Merge "Drop back-compatibility for OutputPage::addWikiText(), now removed" 2019-08-20 17:19:05 +00:00
James D. Forrester d6492afd79 Drop back-compatibility for OutputPage::addWikiText(), now removed
This increases the minimum supported version of MediaWiki to 1.32+ (and
makes it work at all on MediaWiki 1.34+).

Change-Id: Ibc22b6666d997d9edd95a54e36132c10c9e550aa
2019-08-16 15:48:20 +02:00
Abijeet 4c54757006 Replace usage of Title class move methods with MovePage class methods
Using MovePage class methods to check for permissions and to move the
page.

Also added code to handle errors encountered during move operation.

Bug: T225741
Change-Id: I4c4f5bcb3001d4eead64334c5097be5372c173b9
2019-08-16 14:05:14 +05:30
Niklas Laxström cc5a9683d9 Reduce code duplication
Change-Id: Ib668d13f1d7c68b89b17e07913e311af89f01831
2019-08-16 14:03:54 +05:30
Timo Tijhof 9346339d30 ReplaceTextSearch: Hint against IDatabase instead of Database
wfGetDB() returns IDatabase, not Database. Actual implementation
can be a DBConnRef proxy or something else entirely from an
extension that reimplements the interface.

Change-Id: I67c0f3517fc9f1d17d2e4bb11c1669485f1999ba
2019-08-04 17:48:50 +00:00
James D. Forrester 048be08fa5 build: Upgrade phan-taint-check-plugin from 1.5.x to 2.0.1
The method ReplaceTextUtils::link (which is already complicated because
it tries to support ancient MediaWiki) can perform different levels of
escaping depending on whether the HtmlArmor class exists. This is confusing
for taint-check and for humans, and can inevitably lead to errors. Plus
it's bad practice to have a method returning something with a variable
level of taintedness, especially if that depends on something ephemeral
like if a class exists or not.

Thus, the HtmlArmor part is removed, the text is escaped for Linker::link,
and the method now requires non-escaped HTML to be passed in.

Change-Id: I6e2783827580e3d470d316f1d3879679eb67aeda
2019-07-11 14:36:30 +00:00
Umherirrender b459e5621a Replace usage of deprecated SearchEngine::searchableNamespace()
Deprecated since MediaWiki 1.27 and removed by 0a4c2670a1.
Keep the old way for pre 1.27, because mw.org says 1.23

Change-Id: I0d191734f08752d02def657eef004ce5d16ea83d
2019-05-19 14:19:39 +00:00
libraryupgrader bf538064a8 build: Updating mediawiki/mediawiki-codesniffer to 24.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgContLang

Change-Id: I56fb225b2f158ed69fed80fe9a1a2066f407064f
2019-02-07 03:44:53 +00:00
Fomafix a316c0f08f Avoid using core module 'mediawiki.special.search'
The core module 'mediawiki.special.search' contains more functions
which are not needed here and which causes an error message in the
JavaScript console. (T211384)

This change copies the used part of module 'mediawiki.special.search'
to the local module 'ext.ReplaceText'.

The CSS file for the style module 'ext.ReplaceTextStyles' is renamed
from ext.ReplaceText.css to ext.ReplaceTextStyles.css to make
ext.ReplaceText.css free for the CSS part of module 'ext.ReplaceText'.

Bug: T211384
Change-Id: I41225ccdf8a95a7c501fb6eea99abbd08353f4ea
2018-12-22 20:32:33 +01: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
C. Scott Ananian bc50ac5b33 Replace uses of deprecated Language::truncate()
See I2291c69d9df17c1a9e4ab1b7d4cbc73bc51d3ebb for the anticipated
hard-deprecation of this method in core.

Bug: T197492
Change-Id: I071882f8a97cc439d49611d8613ea4105b95afb6
2018-07-02 15:18:44 -04:00
libraryupgrader 0b4b0c7cea build: Updating mediawiki/mediawiki-codesniffer to 20.0.0
Change-Id: I2202a99f3ff7c614e3cc9d17035119107a5fa73e
2018-05-26 06:08:39 +00:00
Yaron Koren f164113698 Follow-up to d7db166e4f - disable regex option for MSSQL as well
Change-Id: Ib859e5b9104b9b9d6909024585b0573695f72f6d
2018-05-10 16:27:14 +00:00
Yaron Koren 43b753b86d Standardized DB type checking
Change-Id: I374c0f9ce0e79181842f53fe9e5778e3fcdc1dcb
2018-05-03 21:32:48 +00:00
Kunal Mehta d5342d874d Add GPL file headers to PHP classes that are missing it
Change-Id: Id8a0f08d9133e07bb5e03a618e6b9c0fe06d8b50
2018-05-03 13:03:40 -07:00
Yaron Koren c854531150 Added limit for search query
Change-Id: I62cd622cfd2f9d44f09648ec51932acdb54a3991
2018-05-03 17:43:31 +00:00
Yaron Koren d7db166e4f Disable regex option for SQLite
Change-Id: I83c8b38a47fc571077fef1fccabb31f5db0ac2e5
2018-05-03 15:36:33 +00:00
Yaron Koren fca559a72e Fix for ee7ac78ca7 - removed extra checkbox for moved pages
Change-Id: I34b3e6186a3136dd9a53ce81b44bf985fd82e7f0
2018-05-03 02:01:21 +00:00
Cindy Cicalese 1f292fb405 Added HtmlArmor.
Bug:T191546
Change-Id: I16de28f829953eb8d1e028e600ca53f583e64e67
2018-05-02 12:43:59 +00:00
Cindy Cicalese 288bd4f5e2 Remove inline JavaScript
Bug:T191546
Change-Id: I14306c05b50a4a9319ed31f8e714a8cab629ca73
2018-04-30 17:41:30 +00:00