Go to the documentation of this file.
14 global $wgCaptcha, $wgCaptchaClass;
16 $class = $wgCaptchaClass;
17 if ( $class ==
null ) {
18 $class =
'SimpleCaptcha';
20 if ( !static::$instanceCreated ) {
21 static::$instanceCreated =
true;
22 $wgCaptcha =
new $class;
63 $summary, $isMinor, $isWatch, $section, $flags, $revision,
Status $status, $baseRevId
67 $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
68 $cache->delete(
$cache->makeKey(
'confirmedit',
'ipwhitelist' ) );
106 return self::getInstance()->confirmEmailUser( $from, $to, $subject, $text, $error );
128 array $requests, array $fieldInfo, array &$formDescriptor, $action
130 self::getInstance()->onAuthChangeFormFields( $requests, $fieldInfo, $formDescriptor, $action );
135 global $wgCaptchaTriggers, $wgAllowConfirmedEmail,
136 $wgWikimediaJenkinsCI, $ceAllowConfirmedEmail;
140 if ( isset( $wgWikimediaJenkinsCI ) && $wgWikimediaJenkinsCI ===
true ) {
141 $wgCaptchaTriggers = array_fill_keys( array_keys( $wgCaptchaTriggers ),
false );
146 if ( isset( $ceAllowConfirmedEmail ) ) {
148 'Using $ceAllowConfirmedEmail is deprecated, ' .
149 'please migrate to $wgAllowConfirmedEmail as a replacement.' );
150 $wgAllowConfirmedEmail = $ceAllowConfirmedEmail;
176 if ( !$wgCaptchaDirectory ) {
177 $wgCaptchaDirectory =
"$wgUploadDirectory/captcha";
197 if ( !
$title->equals( $exceptionTitle ) ) {
202 $out = $ctx->getOutput();
203 $lang = $ctx->getLanguage();
206 $html .= Html::rawElement(
208 [
'class' =>
'warningbox' ],
209 $ctx->msg(
'confirmedit-preview-description' )->parse()
213 [
'class' =>
'wikitable sortable' ]
215 Html::openElement(
'thead' ) .
216 Html::element(
'th', [], $ctx->msg(
'confirmedit-preview-line' )->text() ) .
217 Html::element(
'th', [], $ctx->msg(
'confirmedit-preview-content' )->text() ) .
218 Html::element(
'th', [], $ctx->msg(
'confirmedit-preview-validity' )->text() ) .
219 Html::closeElement(
'thead' );
223 if ( $ip ===
'' || strpos( $ip,
'#' ) !==
false ) {
227 $validity = $ctx->msg(
'confirmedit-preview-valid' )->escaped();
230 $validity = $ctx->msg(
'confirmedit-preview-invalid' )->escaped();
233 $html .= Html::openElement(
'tr' ) .
237 $lang->formatNum( $count + 1 )
244 $lang->truncateForVisual( $ip, 50 )
251 [
'class' =>
'mw-confirmedit-ip-' . $css ],
254 Html::closeElement(
'tr' );
256 $html .= Html::closeElement(
'table' );
257 $out->addModuleStyles(
'ext.confirmEdit.editPreview.ipwhitelist.styles' );
static onTitleReadWhitelist(Title $title, User $user, &$whitelisted)
TitleReadWhitelist hook handler.
if(!isset( $args[0])) $lang
Class representing a MediaWiki article and history.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
static getInstance()
Get the global Captcha instance.
Generic operation result class Has warning/error list, boolean status and arbitrary value.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
static confirmEmailUser( $from, $to, $subject, $text, &$error)
getTitle()
Get the title object of the article.
static makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
static confirmEditMerged( $context, $content, $status, $summary, $user, $minorEdit)
static onFancyCaptchaSetup()
Callback for extension.json of FancyCaptcha to set a default captcha directory, which depends on wgUp...
static showEditFormFields( $editPage, &$out)
$wgUploadDirectory
The filesystem path of the images directory.
static onPageContentSaveComplete(WikiPage $wikiPage, User $user, Content $content, $summary, $isMinor, $isWatch, $section, $flags, $revision, Status $status, $baseRevId)
PageContentSaveComplete hook handler.
static confirmEditPage(EditPage $editpage)
static onAPIGetAllowedParams(&$module, &$params, $flags=1)
APIGetAllowedParams hook handler Default $flags to 1 for backwards-compatible behavior.
The edit page/HTML interface (split from Article) The actual database and text munging is still in Ar...
Base interface for content objects.
Represents a title within MediaWiki.
static confirmEditSetup()
static onAlternateEditPreview(EditPage $editor, &$content, &$html, &$po)
AlternateEditPreview hook handler.
static injectEmailUser(&$form)
static onAuthChangeFormFields(array $requests, array $fieldInfo, array &$formDescriptor, $action)
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
static isIPAddress( $ip)
Determine if a string is as valid IP address or network (CIDR prefix).