Commit graph

1153 commits

Author SHA1 Message Date
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
Translation updater bot c3a68f6a77 Localisation updates from https://translatewiki.net.
Change-Id: I0d0ab91a67894a65fa73efa6cd582c98efca3f1b
2019-04-14 22:30:39 +02:00
Translation updater bot 5254448e72 Localisation updates from https://translatewiki.net.
Change-Id: I556339ec11bf5c9b11d3d5c71c096990e7120380
2019-04-10 09:23:33 +02:00
Translation updater bot bce8eab9fb Localisation updates from https://translatewiki.net.
Change-Id: I3111007efa4d6d3ab85b402c1806e3d33e627caa
2019-04-04 14:54:52 +02:00
James D. Forrester 0a9903293d build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0
Change-Id: I9415c7962bc5b03c12bc8174bffc601ce60e489e
2019-04-03 16:25:25 -07:00
Translation updater bot 1f209ef016 Localisation updates from https://translatewiki.net.
Change-Id: I941a2f4745e067d4de840e517b1000d3f7f1f0e9
2019-03-23 10:23:40 +01:00
libraryupgrader 896b9942a8 build: Updating mediawiki/mediawiki-phan-config to 0.5.0
Change-Id: I3de08f7b42583450b46ecbbcc687af7bdc1442a3
2019-03-10 22:31:52 -07:00
Daimona Eaytoy 25b65a40fe Migrate to new Phan
Bug: T216942
Change-Id: I92c55f8af579a92baa02d9bd1b25b8290f0cd196
2019-03-09 12:42:42 +00:00
Umherirrender f3ff95ce08 Use ExtensionRegistry rather than class_exists
Change-Id: I0b23b5c7338f9f0376cfa8c66a765021054d2dfd
2019-03-03 02:22:02 +01:00
Translation updater bot cba37f1ad2 Localisation updates from https://translatewiki.net.
Change-Id: I899ede0e1af0b756e412eb1ed3d3932fe755ccfd
2019-02-21 22:21:41 +01:00
Translation updater bot 9656b845d2 Localisation updates from https://translatewiki.net.
Change-Id: I47e877faa4f72b9ddb878a0dd1d8d4b5e156c04e
2019-02-14 22:29:28 +01:00
jenkins-bot 65c4b05195 Merge "Update MediaWiki namespaced AtEase global functions" 2019-02-13 06:06:22 +00:00
Reedy 24804b14c9 Update MediaWiki namespaced AtEase global functions
Change-Id: Ie1816dc2c73e284f412e479cf1345984093050d5
2019-02-13 00:25:53 +00:00
Translation updater bot 56ca5d6402 Localisation updates from https://translatewiki.net.
Change-Id: Id302de47622a8154577a20175eada4cc4110723c
2019-02-11 22:28:20 +01:00
Translation updater bot 3151c53313 Localisation updates from https://translatewiki.net.
Change-Id: I99acf6fdae4c6052d866a913be6a57b01e3845c5
2019-02-10 22:18:58 +01:00
Translation updater bot ffe79b79f1 Localisation updates from https://translatewiki.net.
Change-Id: Ieaeb4e7058cd3acb5c6ed182e97eb86b89a6e9b8
2019-02-07 22:28:53 +01:00