Commit graph

968 commits

Author SHA1 Message Date
libraryupgrader 6c92a328c1 build: Updating grunt-banana-checker to 0.8.1
Additional changes:
* Added .eslintcache to .gitignore.

Change-Id: I023b8eeaf282c8ce08ad3ccbd6518f730cc965ea
2019-12-15 01:11:57 +00:00
Translation updater bot b9f8141d41 Localisation updates from https://translatewiki.net.
Change-Id: Idb53b5e9c89b7236e7b0273cd6fa58c57c647bf3
2019-12-06 09:34:17 +01:00
Translation updater bot f04ab4763b Localisation updates from https://translatewiki.net.
Change-Id: I16dc60d05e20333773d9b9a563b114191d410ee6
2019-12-02 09:23:48 +01:00
Translation updater bot d793a972d5 Localisation updates from https://translatewiki.net.
Change-Id: I99d4722aedda2b217e00bb106c424c0306fcbeb4
2019-11-11 15:33:24 +01:00
Bartosz Dziewoński 17313f9738 EmailBlacklist: Suppress warnings from invalid user-supplied regexes
They are suppressed identically in SpamBlacklist.php.

Bug: T64864
Change-Id: I808aa87a8c59ec63f7335236cab1fad6e5d8b86a
2019-11-07 23:08:16 +01:00
Translation updater bot c7bfa9f02b Localisation updates from https://translatewiki.net.
Change-Id: I092fc68fdbc2acbbef2f1cbe299cff0d55ec3605
2019-11-07 09:45:10 +01:00
Umherirrender f287bf7950 build: Updating mediawiki/mediawiki-phan-config to 0.8.0
Bug: T235049
Change-Id: I326457e7779882bcc945753b9406605e76302e8a
2019-11-04 20:04:48 +01:00
Translation updater bot ca702fa6e2 Localisation updates from https://translatewiki.net.
Change-Id: I06f740bde98b59719acb27f412c87159ec7de61f
2019-10-25 09:19:28 +02:00
Translation updater bot 2dde797a3a Localisation updates from https://translatewiki.net.
Change-Id: Ie1f418c0ad0f1ae077465788ca34bc00cdfb8166
2019-10-16 20:41:54 +02:00
James D. Forrester 5a78869772 build: Upgrade mediawiki-codesniffer to v28.0.0
Change-Id: I2e639461d789d0b293d0f97da30a2fcf160804a6
2019-10-11 11:58:00 -07:00
Translation updater bot 1f229e6184 Localisation updates from https://translatewiki.net.
Change-Id: Iecfe9f14be7dbef900f5e4fe2578ae0761c0932e
2019-10-02 09:23:07 +02:00
daniel 9d55ccf86c Remove backwards compatible code.
Per Krinkle's comment at
<https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SpamBlacklist/+/504797/1#message-fb539927b0a2241080960229b9dc2453f6fcd78f>, no backwards compatibility is needed.

Change-Id: Icbf005840d734c7d14a380197f2239a07ba53dbf
2019-09-27 10:52:33 +02:00
daniel 6d559a12fe Support MCR database schema.
This maintains backwards compatibility with MW 1.31.

Cross-wiki loading functionality verified manually.

Bug: T233358
Change-Id: I53e218d8d268060b0b81c5c9bab24b7f5a37917a
2019-09-23 14:49:13 +02:00
jenkins-bot 3a63cfe6a4 Merge "Update README to remove mentions of outdated stuff" 2019-09-20 21:39:46 +00:00
jenkins-bot 915dc55dd2 Merge "Random cleanups" 2019-09-20 21:39:45 +00:00
Translation updater bot beaa13a7a9 Localisation updates from https://translatewiki.net.
Change-Id: Ic1ad9dfd0ea2493d5910cdba226692d120e63f92
2019-09-13 10:21:41 +02:00
Niklas Laxström a24228bca1 Update README to remove mentions of outdated stuff
Mainly $wgSpamBlacklistFiles no longer exists.

Bug: T206264
Change-Id: Ia9d43fcf2ed777aa4796b9dd13c07b7a9ea264c4
2019-09-12 16:19:21 +02:00
Niklas Laxström e74a0120a0 Random cleanups
Change-Id: I0748d1b2062cc8f81175e07c4785eb11e784fe28
2019-09-12 16:19:13 +02:00
Bartosz Dziewoński 5ddc45b62c Actually return errors for action=edit API
Setting 'apiHookResult' results in a "successful" response; if we want
to report an error, we need to use ApiMessage. We already were doing
this for action=upload. Now our action=edit API responses will be
consistent with MediaWiki and other extensions, and will be able to
take advantage of errorformat=html.

Additionally, remove incorrect 'message' value from action=upload
output. It was anyway redundant to the normal error information.

To avoid user interface regressions in VisualEditor, the changes
I3b9c4fef (in VE) and I106dbd3c (in MediaWiki) should be merged first.

Before:
    {
        "edit": {
            "spamblacklist": "example.com/test|example.net/test",
            "result": "Failure"
        }
    }

After:
    {
        "errors": [
            {
                "code": "spamblacklist",
                "data": {
                    "spamblacklist": {
                        "matches": [
                            "example.com/test",
                            "example.net/test"
                        ]
                    }
                },
                "module": "edit",
                "*": "The text you wanted to save was blocked ..."
            }
        ],
        "*": "See http://localhost:3080/w/api.php for API usage. ..."
    }

For comparison, a 'readonly' error:
    {
        "errors": [
            {
                "code": "readonly",
                "data": {
                    "readonlyreason": "foo bar"
                },
                "module": "main",
                "*": "The wiki is currently in read-only mode."
            }
        ],
        "*": "See http://localhost:3080/w/api.php for API usage. ..."
    }

Bug: T229539
Depends-On: I106dbd3cbdbf7082b1d1f1c1106ece6b19c22a86
Depends-On: I3b9c4fefc0869ef7999c21cef754434febd852ec
Change-Id: Id36aa6bdb8f873fe7deb8123a7fc774103721c01
2019-09-10 20:44:35 +00:00
Bartosz Dziewoński 2f1456c4e9 Remove backwards compatibility code for Revision::getQueryInfo()
Revision::getQueryInfo() was added in MediaWiki 1.31. We already
require that or later in our extension.json, so we can safely drop it.

The deprecated methods called by this code have been recently removed
(Id35544b879af1cd708f3efd303fce8d9a1b9eb02) and calling them is
causing Phan failures.

Change-Id: I474367d00c6d3917f1416023901132c0649b3163
2019-09-10 22:41:34 +02:00
Translation updater bot 70e47622ae Localisation updates from https://translatewiki.net.
Change-Id: I4d9d14264b336fe71d21e7f096a1b7f7c765dd28
2019-09-04 10:15:21 +02:00
Translation updater bot ea4ba07ae4 Localisation updates from https://translatewiki.net.
Change-Id: I8bd6ad577e2069e255301cbc9396be388b1b2133
2019-09-03 10:30:11 +02:00
Derick Alangi b9c0f0709b Avoid usage of deprecated $wgContLang global (dep in 1.32)
Change-Id: Ia87a464c22be764deacd699fb66f96a663ccfe7c
2019-09-02 09:49:39 +01:00
Bartosz Dziewoński 19c69f4158 Improve edit/upload error message integration
Compared to other extensions like AbuseFilter, SpamBlacklist's
integration with MediaWiki's error reporting was weird.

* When dealing with page editing, we returned two (or more)
  separate messages, which would then be rendered in a list.
  This looks weird, especially if the messages have fancy wrapper
  boxes etc.
* When dealing with file upload, we returned incomplete
  error message, not reporting the blacklisted link.

Now, in both cases, we return a single error message
containing all the details.

Change-Id: I4ca8e67e03726696a428093cc9fb547a6daa1492
2019-08-29 09:23:58 +00:00
libraryupgrader 466dfbd847 build: Updating eslint-utils to 1.4.2
* https://npmjs.com/advisories/1118

Additional changes:
* Added .eslintcache to .gitignore.

Change-Id: I4cc8586f225d1bee8ab6df8a464d696e4e40b220
2019-08-23 04:55:27 +00:00
Translation updater bot f25761d8cd Localisation updates from https://translatewiki.net.
Change-Id: I17a3ae79662f07c1827e91b7fc524793c08cce22
2019-08-18 09:33:27 +02:00
Umherirrender 8ab128b44a Remove entry point check for files only contain classes
See https://www.mediawiki.org/w/index.php?title=Register_globals&oldid=3063934#Make_sure_code_is_only_executed_in_the_right_context
for more information

Bug: T230026
Change-Id: I937b002d7fa7469aa1b90a413900b9649e524e18
2019-08-07 17:16:41 +02:00
Translation updater bot 699d7f91a5 Localisation updates from https://translatewiki.net.
Change-Id: I759a53ced0e0d8dad57a3011b41dce56100db284
2019-07-29 09:16:03 +02:00
libraryupgrader a0e6c32f29 build: Updating mediawiki/mediawiki-codesniffer to 26.0.0
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected

Additional changes:
* Committed package-lock.json (T179229) too.

Change-Id: Ic5edf46789ab191b59aaae0921b3038381e704b7
2019-07-16 01:27:19 +00:00
Dan Andreescu a72c0f339a Abandon EventLogging instrumentation
The instrumentation attempted here has been implemented more correctly
by https://phabricator.wikimedia.org/T214706.  This change removes
instrumentation from this extension.  It should not affect much,
because emitting events was already disabled.

Bug: T162365
Change-Id: I8f02c62d41260a62b37a7738d69c039d2ce7562f
2019-07-15 16:52:17 -04:00
James D. Forrester 3f6da90ccf build: Upgrade phan-taint-check-plugin from 1.5.x to 2.0.1
Change-Id: I7ec790eb9e3867c37eef8bc2a13687306f446f30
2019-07-11 07:25:20 +00:00
Derick Alangi 4d939a399a Avoid usage of deprecated ObjectCache::getMainWANInstance()
Replacement with services made available in 1.28 and this extension
requires 1.31. So, the replacement is good.

Change-Id: I1960a36541c9578abc3178a3a5ddcac7c32b8292
2019-07-03 13:53:41 +01:00
Translation updater bot 3d81e121f1 Localisation updates from https://translatewiki.net.
Change-Id: Ida964762c7777fc6a11f491ace29bb04657e8019
2019-06-17 22:34:16 +02:00
Translation updater bot 0163942d16 Localisation updates from https://translatewiki.net.
Change-Id: I70d87e8ca3e78294e5ce7413c0ff26230cf7e494
2019-06-13 22:40:44 +02:00
Translation updater bot 12b18713b8 Localisation updates from https://translatewiki.net.
Change-Id: I10b54e9e1bd10ffd9187b09244ca7835c96476d6
2019-06-10 22:55:51 +02:00
libraryupgrader 778fc7e75e build: Updating mediawiki/mediawiki-phan-config to 0.6.1
Change-Id: Iad69fcb79cc630ec69572b5e13e89a33c2764b6a
2019-06-10 11:19:38 +00:00
Translation updater bot b76423da7f Localisation updates from https://translatewiki.net.
Change-Id: Ifa35f648456c2599914080571fe607eeaca03bc6
2019-06-02 22:30:55 +02:00
jenkins-bot 1cb903fc09 Merge "Partially update README" 2019-06-01 13:56:23 +00:00
MarcoAurelio abc36ab304 Partially update README
Bug: T224803
Change-Id: I02ef7215b9c0d231fbd91b84978fe43e3940cdfc
2019-06-01 13:28:25 +00:00
MarcoAurelio 54295ecd04 Use https:// on Wikimedia sites in documentation
Change-Id: I82bcd93e32fce8fe59c5053cc298e84559d32a0b
2019-06-01 10:21:28 +00:00
jenkins-bot 81ae3d404d Merge "Remove deprecation note in comment" 2019-05-31 20:33:34 +00:00
Translation updater bot 5b208a58f5 Localisation updates from https://translatewiki.net.
Change-Id: I353aebecca645f23e1e816d560e3954e73f3d794
2019-05-30 22:54:19 +02:00
James D. Forrester eefa68535f build: Upgrade mediawiki/mediawiki-phan-config from 0.5.0 to 0.6.0
Change-Id: I0e36ef4d87bc1c41002125f7375b95ef5d0cca85
2019-05-19 12:37:10 +00:00
Thiemo Kreuz 25e4813363 Remove not needed array type hint from hook handler
This parameter is not used anyway. It's possible it is null, as
demonstrated in Id2caa44. Because this code does not need it anyway,
it should not do any harm to remove this type hint.

Change-Id: Id107501e6d62e567354c90e5d3aeec47dbf57298
2019-05-15 20:37:20 +02:00
Translation updater bot 6711370b08 Localisation updates from https://translatewiki.net.
Change-Id: Ia5ab00d0150fb09203fe2d49719705b82a5302be
2019-05-13 23:22:37 +02:00
James D. Forrester af6db20f48 build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint
Change-Id: I825c702290766c7be5870fbdb6facc573f498cfe
2019-05-07 10:44:36 -07:00
Translation updater bot db40b12217 Localisation updates from https://translatewiki.net.
Change-Id: I6c2f2ae2cdef3e2638422eb2e29d802db5258f06
2019-04-24 22:21:22 +02:00
Translation updater bot 1554be29f4 Localisation updates from https://translatewiki.net.
Change-Id: I8240c16271d9f5452587daad2c6158c269ee6830
2019-04-22 09:24:10 +02:00
Umherirrender afa8912937 Convert mediawiki links from http to https
Bug: T189687
Change-Id: Iaa8009d1d79f9a86b3d9f6e5a616efeea1c3bce7
2019-04-19 10:52:34 +02:00
Translation updater bot 6c80a07eb0 Localisation updates from https://translatewiki.net.
Change-Id: Id21441e483f9a1fe35d13a77f49bd1e29e90f65c
2019-04-19 09:54:13 +02:00