Commit graph

143 commits

Author SHA1 Message Date
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
Kunal Mehta efd15f5058 Add phan configuration
Change-Id: I405d1d86e43c99fbaecf027461781bf57110421e
2018-04-27 01:17:04 +00:00
Yaron Koren 7efd765c85 Fix for abc67edb70 - fixed error message
Change-Id: Ib98dea476efc2d690b15095fb2abccc0be0ed82d
2018-04-23 02:43:17 +00:00
Cindy Cicalese 80d688ae18 Correctly localize special page name.
Change-Id: I05b337358b0f205dd11cf05491303f4b9068b242
2018-04-18 01:36:04 +00:00
Cindy Cicalese 65f20dcea1 Fix missing message parameter.
Change-Id: Id0a1b3215064ef02c9eadf24877a4e887588c3ce
2018-04-17 21:52:15 +00:00
Yaron Koren 3d25dabe69 Fixed bolding of search term within "search context"
Change-Id: Id990ed6747138a6070889127b2967840654b59aa
2018-04-16 20:07:03 +00:00
Yaron Koren abc67edb70 Added checks for $wgCompressRevisions, $wgExternalStores
Change-Id: Id6724553a5c7624fe26fb89f4746affc744a0b87
2018-04-16 19:54:22 +00:00
Cindy Cicalese 6258d3300a Replaced Linker::link() with LinkRenderer
Bug:T149346
Change-Id: Ibf50c2dc3a80a4395f20d78bfd324ead353b93db
2018-04-16 02:44:47 +00:00
Yaron Koren a647e56345 Split up SpecialReplaceText code into more functions
Change-Id: Ifdfa89c7d5234bde6aa01bb46fc56e5c530b4dfb
2018-04-13 20:17:08 +00:00
Cindy Cicalese 1b237ddcee Fix items from code review
- ReplaceTextHooks:
  - Add $wgReplaceTextUser to UserGetReservedNames hook
- ReplaceTextJob:
  - Use RequestContext::importScopedSession
- replaceAll script
  - Fix summary message to use plain()
  - Fix summary message to correctly handle file-based replacements
  - Remove extra newline injected in file-based replacements

Bug: T191546
Change-Id: Ib0d7f5922761aa2fd01f989e4a0ffb7f281c2ae3
2018-04-12 12:37:49 +00:00
Cindy Cicalese 3c36f7452a Update CI files, dir structure, remove inline JS.
Bug:T191546
Bug:T191919
Change-Id: Ia7ed03a98972262d164fd131bcb84994ad279c7f
2018-04-11 17:21:08 +00:00