MediaWiki REL1_30
ConfirmEditHooks Class Reference

Static Public Member Functions

static APIGetAllowedParams (&$module, &$params, $flags=1)
 
static confirmEditMerged ( $context, $content, $status, $summary, $user, $minorEdit)
 
static confirmEditPage ( $editpage, $buttons, $tabindex)
 
static confirmEditSetup ()
 Set up $wgWhitelistRead.
 
static confirmEmailUser ( $from, $to, $subject, $text, &$error)
 
static efReCaptcha ()
 Extension function, moved from ReCaptcha.php when that was decimated.
 
static getInstance ()
 Get the global Captcha instance.
 
static injectEmailUser (&$form)
 
static onAlternateEditPreview (EditPage $editor, &$content, &$html, &$po)
 AlternateEditPreview hook handler.
 
static onAuthChangeFormFields (array $requests, array $fieldInfo, array &$formDescriptor, $action)
 
static onFancyCaptchaSetup ()
 Callback for extension.json of FancyCaptcha to set a default captcha directory, which depends on wgUploadDirectory.
 
static onPageContentSaveComplete (WikiPage $wikiPage, User $user, Content $content, $summary, $isMinor, $isWatch, $section, $flags, $revision, Status $status, $baseRevId)
 PageContentSaveComplete hook handler.
 
static onReCaptchaSetup ()
 Callback for extension.json of ReCaptcha to require the recaptcha library php file.
 
static onTitleReadWhitelist (Title $title, User $user, &$whitelisted)
 TitleReadWhitelist hook handler.
 
static showEditFormFields (&$editPage, &$out)
 

Static Protected Attributes

static $instanceCreated = false
 

Detailed Description

Definition at line 5 of file ConfirmEditHooks.php.

Member Function Documentation

◆ APIGetAllowedParams()

static ConfirmEditHooks::APIGetAllowedParams ( & $module,
& $params,
$flags = 1 )
static

Definition at line 76 of file ConfirmEditHooks.php.

References $flags, $params, and getInstance().

◆ confirmEditMerged()

static ConfirmEditHooks::confirmEditMerged ( $context,
$content,
$status,
$summary,
$user,
$minorEdit )
static

Definition at line 24 of file ConfirmEditHooks.php.

References $context, and getInstance().

◆ confirmEditPage()

static ConfirmEditHooks::confirmEditPage ( $editpage,
$buttons,
$tabindex )
static

Definition at line 59 of file ConfirmEditHooks.php.

References getInstance().

◆ confirmEditSetup()

static ConfirmEditHooks::confirmEditSetup ( )
static

Set up $wgWhitelistRead.

Definition at line 89 of file ConfirmEditHooks.php.

References wfDeprecated().

◆ confirmEmailUser()

static ConfirmEditHooks::confirmEmailUser ( $from,
$to,
$subject,
$text,
& $error )
static

Definition at line 71 of file ConfirmEditHooks.php.

References getInstance().

◆ efReCaptcha()

static ConfirmEditHooks::efReCaptcha ( )
static

Extension function, moved from ReCaptcha.php when that was decimated.

Make sure the keys are defined.

Definition at line 149 of file ConfirmEditHooks.php.

References $wgServerName, and recaptcha_get_signup_url().

◆ getInstance()

◆ injectEmailUser()

static ConfirmEditHooks::injectEmailUser ( & $form)
static

Definition at line 67 of file ConfirmEditHooks.php.

References getInstance().

◆ onAlternateEditPreview()

static ConfirmEditHooks::onAlternateEditPreview ( EditPage $editor,
& $content,
& $html,
& $po )
static

AlternateEditPreview hook handler.

Replaces the preview with a check of all lines for the [[MediaWiki:Captcha-ip-whitelist]] interface message, if it validates as an IP address.

Parameters
EditPage$editor
Content&$content
string&$html
ParserOutput&$po
Returns
bool

Definition at line 186 of file ConfirmEditHooks.php.

References $css, $editor, $html, $lang, $line, $lines, and $out.

◆ onAuthChangeFormFields()

static ConfirmEditHooks::onAuthChangeFormFields ( array $requests,
array $fieldInfo,
array & $formDescriptor,
$action )
static

Definition at line 80 of file ConfirmEditHooks.php.

References $requests, and getInstance().

◆ onFancyCaptchaSetup()

static ConfirmEditHooks::onFancyCaptchaSetup ( )
static

Callback for extension.json of FancyCaptcha to set a default captcha directory, which depends on wgUploadDirectory.

Definition at line 130 of file ConfirmEditHooks.php.

References $wgUploadDirectory.

◆ onPageContentSaveComplete()

static ConfirmEditHooks::onPageContentSaveComplete ( WikiPage $wikiPage,
User $user,
Content $content,
$summary,
$isMinor,
$isWatch,
$section,
$flags,
$revision,
Status $status,
$baseRevId )
static

PageContentSaveComplete hook handler.

Clear IP whitelist cache on page saves for [[MediaWiki:Captcha-ip-whitelist]].

Parameters
WikiPage$wikiPage
User$user
Content$content
string$summary
bool$isMinor
bool$isWatch
string$section
int$flags
int$revision
Status$status
int$baseRevId
Returns
bool true

Definition at line 47 of file ConfirmEditHooks.php.

References $cache.

◆ onReCaptchaSetup()

static ConfirmEditHooks::onReCaptchaSetup ( )
static

Callback for extension.json of ReCaptcha to require the recaptcha library php file.

FIXME: This should be done in a better way, e.g. only load the libraray, if really needed.

Definition at line 141 of file ConfirmEditHooks.php.

◆ onTitleReadWhitelist()

static ConfirmEditHooks::onTitleReadWhitelist ( Title $title,
User $user,
& $whitelisted )
static

TitleReadWhitelist hook handler.

Parameters
Title$title
User$user
$whitelisted

Definition at line 117 of file ConfirmEditHooks.php.

References $help, $image, and SpecialPage\getTitleFor().

◆ showEditFormFields()

static ConfirmEditHooks::showEditFormFields ( & $editPage,
& $out )
static

Definition at line 63 of file ConfirmEditHooks.php.

References $out, and getInstance().

Member Data Documentation

◆ $instanceCreated

ConfirmEditHooks::$instanceCreated = false
staticprotected

Definition at line 6 of file ConfirmEditHooks.php.


The documentation for this class was generated from the following file: