MediaWiki  1.33.0
ConfirmEditHooks Class Reference

Static Public Member Functions

static confirmEditMerged ( $context, $content, $status, $summary, $user, $minorEdit)
 
static confirmEditPage (EditPage $editpage)
 
static confirmEditSetup ()
 
static confirmEmailUser ( $from, $to, $subject, $text, &$error)
 
static efReCaptcha ()
 Extension function, moved from ReCaptcha.php when that was decimated. More...
 
static getInstance ()
 Get the global Captcha instance. More...
 
static injectEmailUser (&$form)
 
static onAlternateEditPreview (EditPage $editor, &$content, &$html, &$po)
 AlternateEditPreview hook handler. More...
 
static onAPIGetAllowedParams (&$module, &$params, $flags=1)
 APIGetAllowedParams hook handler Default $flags to 1 for backwards-compatible behavior. More...
 
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. More...
 
static onPageContentSaveComplete (WikiPage $wikiPage, User $user, Content $content, $summary, $isMinor, $isWatch, $section, $flags, $revision, Status $status, $baseRevId)
 PageContentSaveComplete hook handler. More...
 
static onReCaptchaSetup ()
 Callback for extension.json of ReCaptcha to require the recaptcha library php file. More...
 
static onTitleReadWhitelist (Title $title, User $user, &$whitelisted)
 TitleReadWhitelist hook handler. More...
 
static showEditFormFields (&$editPage, &$out)
 

Static Protected Attributes

static $instanceCreated = false
 

Detailed Description

Definition at line 3 of file ConfirmEditHooks.php.

Member Function Documentation

◆ confirmEditMerged()

static ConfirmEditHooks::confirmEditMerged (   $context,
  $content,
  $status,
  $summary,
  $user,
  $minorEdit 
)
static
Parameters
RequestContext$context
Content$content
Status$status
string$summary
User$user
bool$minorEdit
Returns
bool

Definition at line 35 of file ConfirmEditHooks.php.

References $content, $context, $user, and getInstance().

◆ confirmEditPage()

static ConfirmEditHooks::confirmEditPage ( EditPage  $editpage)
static
Parameters
EditPage$editpage

Definition at line 75 of file ConfirmEditHooks.php.

References getInstance().

◆ confirmEditSetup()

static ConfirmEditHooks::confirmEditSetup ( )
static

Definition at line 131 of file ConfirmEditHooks.php.

References wfDeprecated().

◆ confirmEmailUser()

static ConfirmEditHooks::confirmEmailUser (   $from,
  $to,
  $subject,
  $text,
$error 
)
static
Parameters
MailAddress$from
MailAddress$to
string$subject
string$text
string&$error
Returns
bool

Definition at line 103 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 191 of file ConfirmEditHooks.php.

References $wgServerName.

◆ getInstance()

◆ injectEmailUser()

static ConfirmEditHooks::injectEmailUser ( $form)
static
Parameters
HTMLForm&$form
Returns
bool

Definition at line 91 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 228 of file ConfirmEditHooks.php.

References $content, $css, $editor, $html, $lang, $line, $lines, $out, $title, as, IP\isIPAddress(), Title\makeTitle(), and NS_MEDIAWIKI.

◆ onAPIGetAllowedParams()

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

APIGetAllowedParams hook handler Default $flags to 1 for backwards-compatible behavior.

Parameters
ApiBase&$module
array&$params
int$flags
Returns
bool

Definition at line 115 of file ConfirmEditHooks.php.

References $params, and getInstance().

◆ onAuthChangeFormFields()

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

Definition at line 125 of file ConfirmEditHooks.php.

References $formDescriptor, $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 172 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 60 of file ConfirmEditHooks.php.

References $cache, $title, ObjectCache\getMainWANInstance(), WikiPage\getTitle(), and NS_MEDIAWIKI.

◆ 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 183 of file ConfirmEditHooks.php.

◆ onTitleReadWhitelist()

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

TitleReadWhitelist hook handler.

Parameters
Title$title
User$user
bool&$whitelisted

Definition at line 159 of file ConfirmEditHooks.php.

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

◆ showEditFormFields()

static ConfirmEditHooks::showEditFormFields ( $editPage,
$out 
)
static
Parameters
EditPage&$editPage
OutputPage&$out

Definition at line 83 of file ConfirmEditHooks.php.

References $out, and getInstance().

Member Data Documentation

◆ $instanceCreated

ConfirmEditHooks::$instanceCreated = false
staticprotected

Definition at line 4 of file ConfirmEditHooks.php.


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