Commit graph

19 commits

Author SHA1 Message Date
Max Semenik 9380fa050e Stop passing objects by reference
Bug: T193950
Change-Id: I8c4aabe75ffce55f81c7ffb0f76b67155db1f761
2020-01-17 20:08:16 +00:00
James D. Forrester d0d036ea50 Drop use of wgParser, replaced in 1.32 and to be removed in 1.35
Bug: T160811
Change-Id: I6147fc4aa6d004cd848c170750a740091c336012
2019-10-28 20:12:00 +00:00
RazeSoldier dd1ccc92ea Enable OOUI in SimpleCaptcha
If we use it without OOUI enabled, an exception will be thrown

Bug: T232129
Change-Id: I46ee483b67776fa528a0267cfcafb1b0cee1a670
2019-09-07 17:46:09 +08:00
Aaron Schulz 82d48cae8c Switch to using BagOStuff::incrWithInit()
Change-Id: Ia82d9985f3f416ccbb5d7414848cc5b894635ca4
2019-08-09 16:50:55 -07:00
Derick Alangi 4a1c8bbfbd SimpleCaptcha: Avoid usage of deprecated wfGlobalCacheKey()
Deprecated in 1.30 and makeGlobalKey() on a BagOStuff was available
since 1.27. This extension requires 1.31 so the migration seems fine.

Change-Id: Ia7b276ee65fdf58c4fc0859563930528d44a03ca
2019-07-18 17:40:04 +01:00
Derick Alangi 92b41aa481 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: Idd5dda1e7cfa34b71ffb13446eb0f9e4f113f678
2019-07-03 13:43:23 +01:00
jenkins-bot bdefccfd6c Merge "Fix bug in Captcha::confirmEditMerged which breaks the $wgCaptchaRegex check" 2019-05-26 10:42:22 +00:00
Umherirrender 72900c1ac5 Improve param docs
Change-Id: Ie0619f6f946e651df9c102f0f4f305c15b10eab4
2019-05-23 21:16:12 +02:00
Porplemontage e8c475dc8d Fix bug in Captcha::confirmEditMerged which breaks the $wgCaptchaRegex check
Change the passing of $section to an empty string instead of false to properly comply with its type and the check in Captcha::loadText

Bug: T211848
Change-Id: I0555f7fbe246b0a4741759aee5b265b4f2cc3843
2019-05-22 22:33:53 +00:00
Florian a46515f782 Do not ignore message parameters
The return value of the getMessage function is intentionally a Message
object (which can have different stuff, be a RawMessage or contain
parameters. Just getting the key of the message, passing it to another
function which just creates a new message out of it, doesn't make sense
and breaks the original intention of the method.

This is now fixed by this change.

Bug: T222590
Change-Id: Id8ebba6b8239e6eee4be698680edcafad6c86cb0
2019-05-18 21:27:16 +02:00
Umherirrender 9bc797453e Swap ternary check for if statement
isset is not needed to check for null
and if is used, because the else branch is not needed

Change-Id: I3069ac43911101aa500c4897d419dca68f968040
2019-03-14 19:54:36 +01:00
libraryupgrader 87715809bb build: Updating mediawiki/mediawiki-codesniffer to 24.0.0
Change-Id: I4650b34b2c6d18cae2bf4650aaf423810fb96457
2019-02-06 12:04:20 +00:00
Ed Sanders 423234cb77 Convert SimpleCaptcha to OOUI
Change-Id: Ic904b53b2ac489be572f4b6096ddc8c92c482a59
2018-12-12 11:51:38 +00:00
C. Scott Ananian 7b4a11d0ca Replace deprecated OutputPage::parse()
The OutputPage::parse() method emits untidy output and is often used
with the wrong user interface/content language selection.  Replace
with Message::parseAsBlock() which was tidied in
I0f417f75a49dfea873e9a2f44d81796a48b9f428.

Bug: T198214
Change-Id: If1f0887ccd447e725fafbfcd842866c35ebb1a7e
2018-10-26 18:57:57 +00:00
C. Scott Ananian d22d1e88f4 Replace deprecated untidy OutputPage::addWikiText() method
The replacement OutputPage::addWikiMsg() method is ancient, and so
no bump to the minimum required MW version is needed.

Bug: T198214
Change-Id: I082bfb4585632dc37464d04aa93938ca05a9fdd0
2018-10-17 12:46:25 -04:00
C. Scott Ananian 0312de771d Only expand {{...}} in messages once
If we're going to call `OutputPage::addWikiText` to parse the message,
we don't need to pre-expand `{{...}}` markup using `Message::text()`
before passing it to the parser; `Message::plain()` works fine.  This
makes these callsites consistent with how `OutputPage::addWikiMsg()`
inserts messages.

Bug: T206574
Change-Id: Ic6e9c24139613f9c46e814f630c08d5a52789032
2018-10-11 09:32:49 -04:00
libraryupgrader f852bdb403 build: Updating mediawiki/mediawiki-codesniffer to 22.0.0
Change-Id: I69c8746bafc4f0a39cc007db6a221d206c89c522
2018-09-03 00:12:31 +00:00
Stephane Bisson 93818fe9d1 Make shouldCheck public again
Follow up Ie956fe86184535a376d0398483ac3c853fa9127c

Make SimpleCaptcha::shouldCheck public since it is
called by Flow/includes/SpamFilter/ConfirmEdit.php(35)
and is now failing in production.

Bug: T199811
Change-Id: I85a813aaa06b896266c320089e24ca2e5e81d0ee
2018-07-17 11:27:48 -04:00
Max Semenik 5b7a36a521 Clean up some phpcs problems
Change-Id: Ie956fe86184535a376d0398483ac3c853fa9127c
2018-07-12 23:13:58 +00:00
Renamed from SimpleCaptcha/Captcha.php (Browse further)