Go to file
Tim Starling 40c7e9c9aa Use the shared parse on API edit
ConfirmEdit was tripling the API save time, because it was parsing the
entire content twice to evaluate whether the addurl trigger is hit.

While I was here, I stopped using the deprecated non-Content hooks. The
new hook, EditEditFilterMergedContent, does not pass an EditPage object,
which means that Title or WikiPage objects need to be passed around
instead. Also, since EditPage::showEditForm() cannot be called with no
EditPage object, use a EditPage::showEditForm:fields hook instead.

If non-wikitext content is edited, assume that the regex trigger is not
hit.

For further architectural details, see the associated core change:
I4b4270dd868a . MW_EDITFILTERMERGED_SUPPORTS_API is a constant
introduced to detect the presence of the associated core change.

Also, in APIGetAllowedParams, set the allowed parameters even if we are
not on the help screen. This allows API users to submit their CAPTCHA
answer without it failing with an "unrecognized parameter" error.

Compatibility with MediaWiki 1.21 is retained, compatibility before that
is dropped.

Change-Id: I9529b7e8d3fc9301c754b28fda185aa3ab36f13e
2014-12-08 10:56:17 +11:00
i18n Localisation updates from https://translatewiki.net. 2014-12-07 21:52:56 +01:00
maintenance Merge "Disable ulimit time limit for long-running captcha.py script." 2013-01-02 18:27:41 +00:00
resources Remove Asirra integration 2014-10-07 16:18:09 +01:00
.gitignore Maintenance for ConfirmEdit extension. 2012-08-16 23:21:50 +02:00
.gitreview Adding .gitreview 2012-03-23 10:18:11 -07:00
ApiFancyCaptchaReload.php Add i18n for API module help 2014-10-29 16:37:38 -04:00
blacklist Add more words to blacklist 2014-06-24 11:02:04 -07:00
Captcha.php Use the shared parse on API edit 2014-12-08 10:56:17 +11:00
captcha.py Add a gradient to FancyCaptcha 2014-09-26 10:41:26 +10:00
CaptchaStore.php (bug 37643) Ensure a session is created when necessary for Captcha 2012-09-28 00:37:03 +00:00
ConfirmEdit.alias.php Localisation updates from https://translatewiki.net. 2014-04-10 20:28:59 +00:00
ConfirmEdit.i18n.php Update i18n shim 2014-04-22 13:15:23 +00:00
ConfirmEdit.php Use the shared parse on API edit 2014-12-08 10:56:17 +11:00
ConfirmEditHooks.php Use the shared parse on API edit 2014-12-08 10:56:17 +11:00
COPYING Add COPYING 2014-02-08 01:51:17 +00:00
FancyCaptcha.class.php Make captchas use mw-ui-input when available 2014-07-29 18:40:56 -07:00
FancyCaptcha.i18n.php Update i18n shim 2014-04-22 13:15:23 +00:00
FancyCaptcha.php Migrate to JSON i18n 2014-03-26 12:58:25 +01:00
MathCaptcha.class.php Use PHP's built-in class_exists instead of MWInit::classExists 2013-07-24 01:00:28 -07:00
MathCaptcha.php More maintenance for ConfirmEdit extension. 2012-09-02 14:26:45 +02:00
QuestyCaptcha.class.php Make captchas use mw-ui-input when available 2014-07-29 18:40:56 -07:00
QuestyCaptcha.i18n.php Update i18n shim 2014-04-22 13:15:23 +00:00
QuestyCaptcha.php Migrate to JSON i18n 2014-03-26 12:58:25 +01:00
README Remove Asirra integration 2014-10-07 16:18:09 +01:00
ReCaptcha.class.php Update API parameter injection 2013-03-16 11:51:25 -04:00
ReCaptcha.i18n.php Update i18n shim 2014-04-22 13:15:23 +00:00
ReCaptcha.php Migrate to JSON i18n 2014-03-26 12:58:25 +01:00
recaptchalib.php Use public instead of var in classes 2014-08-17 22:04:49 +01:00

ConfirmEdit extension for MediaWiki

This extension provides various CAPTCHA tools for MediaWiki, to allow
for protection against spambots and other automated tools.

For more information, see the extension homepage at:
http://www.mediawiki.org/wiki/Extension:ConfirmEdit

== Overview ==

The following modules are included in ConfirmEdit:

* SimpleCaptcha - users have to solve an arithmetic math problem
* MathCaptcha - users have to solve a math problem that's displayed as
an image
* FancyCaptcha - users have to identify a series of characters, displayed
in a stylized way
* QuestyCaptcha - users have to answer a question, out of a series of
questions defined by the administrator(s)
* ReCaptcha - users have to identify a series of characters, either
visually or audially, from a widget provided by the reCAPTCHA service

== License ==

ConfirmEdit is published under the GPL license.

== Authors ==

The main framework, and the SimpleCaptcha and FancyCaptcha modules, were
written by Brion Vibber.

The MathCaptcha module was written by Rob Church.

The QuestyCaptcha module was written by Benjamin Lees.

The reCAPTCHA module was written by Mike Crawford and Ben Maurer.

Additional maintenance work was done by Yaron Koren.

== Changelog ==

= Version 1.2
Fixes bug 46132 - ConfirmEdit fatal error when using MathCaptcha and current Math extension.
See <https://bugzilla.wikimedia.org/show_bug.cgi?id=46132>.