139 if ( is_array(
$type ) ) {
148 if ( !array_key_exists(
$type, self::$changeTypes ) ) {
151 return self::$changeTypes[
$type];
161 return array_search( $rcType, self::$changeTypes,
true ) ?:
"$rcType";
172 return array_keys( self::$changeTypes );
182 return self::newFromConds( [
'rc_id' => $rcid ], __METHOD__ );
200 $rcQuery = self::getQueryInfo();
201 $row = $db->selectRow(
202 $rcQuery[
'tables'], $rcQuery[
'fields'], $conds,
$fname, [], $rcQuery[
'joins']
204 if ( $row !==
false ) {
205 return self::newFromRow( $row );
226 throw new BadMethodCallException(
227 'Cannot use ' . __METHOD__ .
' when $wgActorTableSchemaMigrationStage > MIGRATION_WRITE_BOTH'
236 'rc_actor' =>
'NULL',
256 ] + CommentStore::getStore()->getFields(
'rc_comment' );
269 $commentQuery = CommentStore::getStore()->getJoin(
'rc_comment' );
270 $actorQuery = ActorMigration::newMigration()->getJoin(
'rc_user' );
272 'tables' => [
'recentchanges' ] + $commentQuery[
'tables'] + $actorQuery[
'tables'],
295 ] + $commentQuery[
'fields'] + $actorQuery[
'fields'],
296 'joins' => $commentQuery[
'joins'] + $actorQuery[
'joins'],
313 $this->mExtra = $extra;
320 if ( $this->mTitle ===
false ) {
321 $this->mTitle = Title::makeTitle( $this->mAttribs[
'rc_namespace'], $this->mAttribs[
'rc_title'] );
324 return $this->mTitle;
333 if ( $this->mPerformer ===
false ) {
334 if ( !empty( $this->mAttribs[
'rc_actor'] ) ) {
336 } elseif ( !empty( $this->mAttribs[
'rc_user'] ) ) {
338 } elseif ( !empty( $this->mAttribs[
'rc_user_text'] ) ) {
341 throw new MWException(
'RecentChange object lacks rc_actor, rc_user, and rc_user_text' );
345 return $this->mPerformer;
352 public function save( $noudp =
false ) {
356 if ( !is_array( $this->mExtra ) ) {
361 $this->mAttribs[
'rc_ip'] =
'';
364 # Strict mode fixups (not-NULL fields)
365 foreach ( [
'minor',
'bot',
'new',
'patrolled',
'deleted' ]
as $field ) {
366 $this->mAttribs[
"rc_$field"] = (int)$this->mAttribs[
"rc_$field"];
368 # ...more fixups (NULL fields)
369 foreach ( [
'old_len',
'new_len' ]
as $field ) {
370 $this->mAttribs[
"rc_$field"] = isset( $this->mAttribs[
"rc_$field"] )
371 ? (int)$this->mAttribs[
"rc_$field"]
375 # If our database is strict about IP addresses, use NULL instead of an empty string
376 $strictIPs = in_array( $dbw->getType(), [
'oracle',
'postgres' ] );
377 if ( $strictIPs && $this->mAttribs[
'rc_ip'] ==
'' ) {
378 unset( $this->mAttribs[
'rc_ip'] );
381 # Trim spaces on user supplied text
382 $this->mAttribs[
'rc_comment'] = trim( $this->mAttribs[
'rc_comment'] );
384 # Fixup database timestamps
385 $this->mAttribs[
'rc_timestamp'] = $dbw->timestamp( $this->mAttribs[
'rc_timestamp'] );
387 # # If we are using foreign keys, an entry of 0 for the page_id will fail, so use NULL
388 if ( $this->mAttribs[
'rc_cur_id'] == 0 ) {
389 unset( $this->mAttribs[
'rc_cur_id'] );
392 $row = $this->mAttribs;
394 # Convert mAttribs['rc_comment'] for CommentStore
395 $comment = $row[
'rc_comment'];
396 unset( $row[
'rc_comment'], $row[
'rc_comment_text'], $row[
'rc_comment_data'] );
397 $row += CommentStore::getStore()->insert( $dbw,
'rc_comment', $comment );
399 # Convert mAttribs['rc_user'] etc for ActorMigration
401 isset( $row[
'rc_user'] ) ? $row[
'rc_user'] :
null,
402 isset( $row[
'rc_user_text'] ) ? $row[
'rc_user_text'] :
null,
403 isset( $row[
'rc_actor'] ) ? $row[
'rc_actor'] : null
405 unset( $row[
'rc_user'], $row[
'rc_user_text'], $row[
'rc_actor'] );
406 $row += ActorMigration::newMigration()->getInsertValues( $dbw,
'rc_user',
$user );
408 # Don't reuse an existing rc_id for the new row, if one happens to be
409 # set for some reason.
410 unset( $row[
'rc_id'] );
413 $dbw->insert(
'recentchanges', $row, __METHOD__ );
416 $this->mAttribs[
'rc_id'] = $dbw->insertId();
421 Hooks::run(
'RecentChange_save', [ &$rc ] );
423 if ( count( $this->tags ) ) {
425 $this->mAttribs[
'rc_this_oldid'], $this->mAttribs[
'rc_logid'],
null, $this );
428 # Notify external application via UDP
433 # E-mail notifications
440 Hooks::run(
'AbortEmailNotification', [
$editor,
$title, $this ] ) &&
445 $dbw->onTransactionIdle(
448 $enotif->notifyOnPageChange(
451 $this->mAttribs[
'rc_timestamp'],
452 $this->mAttribs[
'rc_comment'],
453 $this->mAttribs[
'rc_minor'],
454 $this->mAttribs[
'rc_last_oldid'],
455 $this->mExtra[
'pageStatus']
464 if ( $this->mAttribs[
'rc_user'] > 0 ) {
475 if ( $feeds ===
null ) {
483 'omit_bots' =>
false,
484 'omit_anon' =>
false,
485 'omit_user' =>
false,
486 'omit_minor' =>
false,
487 'omit_patrolled' =>
false,
491 (
$params[
'omit_bots'] && $this->mAttribs[
'rc_bot'] ) ||
492 (
$params[
'omit_anon'] && $performer->isAnon() ) ||
493 (
$params[
'omit_user'] && !$performer->isAnon() ) ||
494 (
$params[
'omit_minor'] && $this->mAttribs[
'rc_minor'] ) ||
495 (
$params[
'omit_patrolled'] && $this->mAttribs[
'rc_patrolled'] ) ||
501 if ( isset( $this->mExtra[
'actionCommentIRC'] ) ) {
502 $actionComment = $this->mExtra[
'actionCommentIRC'];
504 $actionComment =
null;
508 $feed->notify( $this, $actionComment );
523 $scheme = parse_url( $uri, PHP_URL_SCHEME );
525 throw new MWException(
"Invalid RCFeed uri: '$uri'" );
528 throw new MWException(
"Unknown RCFeedEngine scheme: '$scheme'" );
530 if ( defined(
'MW_PHPUNIT_TEST' ) && is_object(
$wgRCEngines[$scheme] ) ) {
550 : self::newFromId( $change );
578 $this->
getAttribute(
'rc_log_type' ) ==
'upload' ) ) ) {
579 $errors[] = [
'rcpatroldisabled' ];
582 $right =
$auto ?
'autopatrol' :
'patrol';
583 $errors = array_merge( $errors, $this->
getTitle()->getUserPermissionsErrors( $right,
$user ) );
584 if ( !Hooks::run(
'MarkPatrolled',
587 $errors[] = [
'hookaborted' ];
591 if (
$user->getName() === $this->getAttribute(
'rc_user_text' )
592 && !
$user->isAllowed(
'autopatrol' )
594 $errors[] = [
'markedaspatrollederror-noautopatrol' ];
609 'MarkPatrolledComplete',
625 'rc_patrolled' => self::PRC_PATROLLED
634 $this->
getTitle()->invalidateCache();
636 return $dbw->affectedRows();
659 $timestamp, &$title, $minor, &$user, $comment, $oldId, $lastTimestamp,
660 $bot, $ip =
'', $oldSize = 0, $newSize = 0, $newId = 0, $patrol = 0,
665 $rc->mPerformer =
$user;
667 'rc_timestamp' => $timestamp,
668 'rc_namespace' =>
$title->getNamespace(),
669 'rc_title' =>
$title->getDBkey(),
671 'rc_source' => self::SRC_EDIT,
672 'rc_minor' => $minor ? 1 : 0,
673 'rc_cur_id' =>
$title->getArticleID(),
674 'rc_user' =>
$user->getId(),
675 'rc_user_text' =>
$user->getName(),
676 'rc_actor' =>
$user->getActorId(),
677 'rc_comment' => &$comment,
678 'rc_comment_text' => &$comment,
679 'rc_comment_data' =>
null,
680 'rc_this_oldid' => $newId,
681 'rc_last_oldid' => $oldId,
682 'rc_bot' => $bot ? 1 : 0,
683 'rc_ip' => self::checkIPAddress( $ip ),
684 'rc_patrolled' => intval( $patrol ),
685 'rc_new' => 0, # obsolete
686 'rc_old_len' => $oldSize,
687 'rc_new_len' => $newSize,
690 'rc_log_type' =>
null,
691 'rc_log_action' =>
'',
696 'prefixedDBkey' =>
$title->getPrefixedDBkey(),
697 'lastTimestamp' => $lastTimestamp,
698 'oldSize' => $oldSize,
699 'newSize' => $newSize,
700 'pageStatus' =>
'changed'
703 DeferredUpdates::addCallableUpdate(
705 $rc->addTags(
$tags );
708 DeferredUpdates::POSTSEND,
733 $timestamp, &$title, $minor, &$user, $comment, $bot,
734 $ip =
'', $size = 0, $newId = 0, $patrol = 0, $tags = []
738 $rc->mPerformer =
$user;
740 'rc_timestamp' => $timestamp,
741 'rc_namespace' =>
$title->getNamespace(),
742 'rc_title' =>
$title->getDBkey(),
744 'rc_source' => self::SRC_NEW,
745 'rc_minor' => $minor ? 1 : 0,
746 'rc_cur_id' =>
$title->getArticleID(),
747 'rc_user' =>
$user->getId(),
748 'rc_user_text' =>
$user->getName(),
749 'rc_actor' =>
$user->getActorId(),
750 'rc_comment' => &$comment,
751 'rc_comment_text' => &$comment,
752 'rc_comment_data' =>
null,
753 'rc_this_oldid' => $newId,
754 'rc_last_oldid' => 0,
755 'rc_bot' => $bot ? 1 : 0,
756 'rc_ip' => self::checkIPAddress( $ip ),
757 'rc_patrolled' => intval( $patrol ),
758 'rc_new' => 1, # obsolete
760 'rc_new_len' => $size,
763 'rc_log_type' =>
null,
764 'rc_log_action' =>
'',
769 'prefixedDBkey' =>
$title->getPrefixedDBkey(),
770 'lastTimestamp' => 0,
773 'pageStatus' =>
'created'
776 DeferredUpdates::addCallableUpdate(
778 $rc->addTags(
$tags );
781 DeferredUpdates::POSTSEND,
803 public static function notifyLog( $timestamp, &$title, &$user, $actionComment, $ip,
$type,
804 $action, $target, $logComment,
$params, $newId = 0, $actionCommentIRC =
''
808 # Don't add private logs to RC!
812 $rc = self::newLogEntry( $timestamp,
$title,
$user, $actionComment, $ip,
$type, $action,
813 $target, $logComment,
$params, $newId, $actionCommentIRC );
836 public static function newLogEntry( $timestamp, &$title, &$user, $actionComment, $ip,
837 $type, $action, $target, $logComment,
$params, $newId = 0, $actionCommentIRC =
'',
838 $revId = 0, $isPatrollable =
false ) {
841 # # Get pageStatus for email notification
842 switch (
$type .
'-' . $action ) {
843 case 'delete-delete':
844 case 'delete-delete_redir':
845 $pageStatus =
'deleted';
848 case 'move-move_redir':
849 $pageStatus =
'moved';
851 case 'delete-restore':
852 $pageStatus =
'restored';
854 case 'upload-upload':
855 $pageStatus =
'created';
857 case 'upload-overwrite':
859 $pageStatus =
'changed';
864 $markPatrolled = $isPatrollable ?
$user->isAllowed(
'autopatrol' ) :
true;
867 $rc->mTitle = $target;
868 $rc->mPerformer =
$user;
870 'rc_timestamp' => $timestamp,
871 'rc_namespace' => $target->getNamespace(),
872 'rc_title' => $target->getDBkey(),
874 'rc_source' => self::SRC_LOG,
876 'rc_cur_id' => $target->getArticleID(),
877 'rc_user' =>
$user->getId(),
878 'rc_user_text' =>
$user->getName(),
879 'rc_actor' =>
$user->getActorId(),
880 'rc_comment' => &$logComment,
881 'rc_comment_text' => &$logComment,
882 'rc_comment_data' =>
null,
883 'rc_this_oldid' => $revId,
884 'rc_last_oldid' => 0,
885 'rc_bot' =>
$user->isAllowed(
'bot' ) ? (int)
$wgRequest->getBool(
'bot',
true ) : 0,
886 'rc_ip' => self::checkIPAddress( $ip ),
887 'rc_patrolled' => $markPatrolled ? self::PRC_PATROLLED : self::PRC_UNPATROLLED,
888 'rc_new' => 0, # obsolete
889 'rc_old_len' =>
null,
890 'rc_new_len' =>
null,
892 'rc_logid' => $newId,
893 'rc_log_type' =>
$type,
894 'rc_log_action' => $action,
899 'prefixedDBkey' =>
$title->getPrefixedDBkey(),
900 'lastTimestamp' => 0,
901 'actionComment' => $actionComment,
902 'pageStatus' => $pageStatus,
903 'actionCommentIRC' => $actionCommentIRC
932 Title $categoryTitle,
948 if ( $added !==
null ) {
953 $rc->mTitle = $categoryTitle;
954 $rc->mPerformer =
$user;
956 'rc_timestamp' => $timestamp,
958 'rc_title' => $categoryTitle->
getDBkey(),
960 'rc_source' => self::SRC_CATEGORIZE,
964 'rc_user_text' =>
$user ?
$user->getName() :
'',
965 'rc_actor' =>
$user ?
$user->getActorId() :
null,
966 'rc_comment' => &$comment,
967 'rc_comment_text' => &$comment,
968 'rc_comment_data' =>
null,
969 'rc_this_oldid' => $newRevId,
970 'rc_last_oldid' => $oldRevId,
971 'rc_bot' => $bot ? 1 : 0,
972 'rc_ip' => self::checkIPAddress( $ip ),
973 'rc_patrolled' => self::PRC_PATROLLED,
974 'rc_new' => 0, # obsolete
975 'rc_old_len' =>
null,
976 'rc_new_len' =>
null,
977 'rc_deleted' => $deleted,
979 'rc_log_type' =>
null,
980 'rc_log_action' =>
'',
986 'lastTimestamp' => $lastTimestamp,
989 'pageStatus' =>
'changed'
1014 $this->mAttribs = get_object_vars( $row );
1015 $this->mAttribs[
'rc_timestamp'] =
wfTimestamp( TS_MW, $this->mAttribs[
'rc_timestamp'] );
1017 $this->mAttribs[
'rc_deleted'] = $row->rc_deleted;
1019 if ( isset( $this->mAttribs[
'rc_ip'] ) ) {
1021 $n = strpos( $this->mAttribs[
'rc_ip'],
'/' );
1022 if ( $n !==
false ) {
1023 $this->mAttribs[
'rc_ip'] = substr( $this->mAttribs[
'rc_ip'], 0, $n );
1027 $comment = CommentStore::getStore()
1031 $this->mAttribs[
'rc_comment'] = &$comment;
1032 $this->mAttribs[
'rc_comment_text'] = &$comment;
1033 $this->mAttribs[
'rc_comment_data'] =
null;
1036 isset( $this->mAttribs[
'rc_user'] ) ? $this->mAttribs[
'rc_user'] :
null,
1037 isset( $this->mAttribs[
'rc_user_text'] ) ? $this->mAttribs[
'rc_user_text'] :
null,
1038 isset( $this->mAttribs[
'rc_actor'] ) ? $this->mAttribs[
'rc_actor'] : null
1040 $this->mAttribs[
'rc_user'] =
$user->getId();
1041 $this->mAttribs[
'rc_user_text'] =
$user->getName();
1042 $this->mAttribs[
'rc_actor'] =
$user->getActorId();
1052 if (
$name ===
'rc_comment' ) {
1053 return CommentStore::getStore()
1054 ->getComment(
'rc_comment', $this->mAttribs,
true )->text;
1057 if (
$name ===
'rc_user' ||
$name ===
'rc_user_text' ||
$name ===
'rc_actor' ) {
1059 isset( $this->mAttribs[
'rc_user'] ) ? $this->mAttribs[
'rc_user'] :
null,
1060 isset( $this->mAttribs[
'rc_user_text'] ) ? $this->mAttribs[
'rc_user_text'] :
null,
1061 isset( $this->mAttribs[
'rc_actor'] ) ? $this->mAttribs[
'rc_actor'] : null
1063 if (
$name ===
'rc_user' ) {
1064 return $user->getId();
1066 if (
$name ===
'rc_user_text' ) {
1067 return $user->getName();
1069 if (
$name ===
'rc_actor' ) {
1070 return $user->getActorId();
1074 return isset( $this->mAttribs[
$name] ) ? $this->mAttribs[
$name] :
null;
1081 return $this->mAttribs;
1091 if ( $this->mAttribs[
'rc_type'] ==
RC_EDIT ) {
1092 $trail =
"curid=" . (int)( $this->mAttribs[
'rc_cur_id'] ) .
1093 "&oldid=" . (int)( $this->mAttribs[
'rc_last_oldid'] );
1095 $trail .=
'&diff=0';
1097 $trail .=
'&diff=' . (int)( $this->mAttribs[
'rc_this_oldid'] );
1115 $old = $this->mAttribs[
'rc_old_len'];
1118 $new = $this->mAttribs[
'rc_new_len'];
1120 if ( $old ===
null || $new ===
null ) {
1130 if ( !IP::isIPAddress( $ip ) ) {
1131 throw new MWException(
"Attempt to write \"" . $ip .
1132 "\" as an IP address into recent changes" );
1169 Wikimedia\suppressWarnings();
1171 Wikimedia\restoreWarnings();
1173 return $unserializedParams;
1185 if ( is_string(
$tags ) ) {
1186 $this->tags[] =
$tags;
1188 $this->tags = array_merge(
$tags, $this->tags );
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
unserialize( $serialized)
$wgRCFeeds
Recentchanges items are periodically purged; entries older than this many seconds will go.
$wgPutIPinRC
Log IP addresses in the recentchanges table; can be accessed only by extensions (e....
$wgUseFilePatrol
Use file patrolling to check new files on Special:Newfiles.
$wgLogRestrictions
This restricts log access to those who have a certain right Users without this will not see it in the...
$wgShowUpdatedMarker
Show "Updated (since my last visit)" marker in RC view, watchlist and history view for watched pages ...
$wgUseRCPatrol
Use RC Patrolling to check for vandalism (from recent changes and watchlists) New pages and new files...
$wgUseNPPatrol
Use new page patrolling to check new pages on Special:Newpages.
$wgRCMaxAge
Recentchanges items are periodically purged; entries older than this many seconds will go.
$wgRCEngines
Used by RecentChange::getEngine to find the correct engine for a given URI scheme.
int $wgActorTableSchemaMigrationStage
Actor table schema migration stage.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
if(defined( 'MW_SETUP_CALLBACK')) $fname
Customization point after all loading (constants, functions, classes, DefaultSettings,...
if(! $wgDBerrorLogTZ) $wgRequest
static showCharacterDifference( $old, $new, IContextSource $context=null)
Show formatted char difference.
This module processes the email notifications when the current page is changed.
static singleton( $domain=false)
static record( $rc, $auto=false, User $user=null, $tags=null)
Record a log event for a change being patrolled.
static factory(array $params)
Utility class for creating new RC entries.
static getEngine( $uri, $params=[])
static parseToRCType( $type)
Parsing text to RC_* constants.
reallyMarkPatrolled()
Mark this RecentChange patrolled, without error checking.
parseParams()
Parses and returns the rc_params attribute.
static array $changeTypes
Array of change types.
static selectFields()
Return the list of recentchanges fields that should be selected to create a new recentchanges object.
getPerformer()
Get the User object of the person who performed this change.
static checkIPAddress( $ip)
static getChangeTypes()
Get an array of all change types.
static newForCategorization( $timestamp, Title $categoryTitle, User $user=null, $comment, Title $pageTitle, $oldRevId, $newRevId, $lastTimestamp, $bot, $ip='', $deleted=0, $added=null)
Constructs a RecentChange object for the given categorization This does not call save() on the object...
static isInRCLifespan( $timestamp, $tolerance=0)
Check whether the given timestamp is new enough to have a RC row with a given tolerance as the recent...
static markPatrolled( $change, $auto=false, $tags=null)
Mark a given change as patrolled.
int $counter
Line number of recent change.
doMarkPatrolled(User $user, $auto=false, $tags=null)
Mark this RecentChange as patrolled.
static getQueryInfo()
Return the tables, fields, and join conditions to be selected to create a new recentchanges object.
static newLogEntry( $timestamp, &$title, &$user, $actionComment, $ip, $type, $action, $target, $logComment, $params, $newId=0, $actionCommentIRC='', $revId=0, $isPatrollable=false)
static newFromConds( $conds, $fname=__METHOD__, $dbType=DB_REPLICA)
Find the first recent change matching some specific conditions.
getCharacterDifference( $old=0, $new=0)
Returns the change size (HTML).
static parseFromRCType( $rcType)
Parsing RC_* constants to human-readable test.
notifyRCFeeds(array $feeds=null)
Notify all the feeds about the change.
save( $noudp=false)
Writes the data in this object to the database.
array $tags
List of tags to apply.
getParam( $name)
Get a parameter value.
addTags( $tags)
Tags to append to the recent change, and associated revision/log.
static notifyNew( $timestamp, &$title, $minor, &$user, $comment, $bot, $ip='', $size=0, $newId=0, $patrol=0, $tags=[])
Makes an entry in the database corresponding to page creation Note: the title object must be loaded w...
loadFromRow( $row)
Initialises the members of this object from a mysql row object.
getAttribute( $name)
Get an attribute value.
static notifyLog( $timestamp, &$title, &$user, $actionComment, $ip, $type, $action, $target, $logComment, $params, $newId=0, $actionCommentIRC='')
static notifyEdit( $timestamp, &$title, $minor, &$user, $comment, $oldId, $lastTimestamp, $bot, $ip='', $oldSize=0, $newSize=0, $newId=0, $patrol=0, $tags=[])
Makes an entry in the database corresponding to an edit.
diffLinkTrail( $forceCur)
Gets the end part of the diff URL associated with this object Blank if no diff link should be display...
static newFromId( $rcid)
Obtain the recent change with a given rc_id value.
static newCacheUpdateJob()
This is to display changes made to all articles linked in an article.
Represents a title within MediaWiki.
getNamespace()
Get the namespace index, i.e.
getPrefixedDBkey()
Get the prefixed database key form.
getDBkey()
Get the main part with underscores.
getArticleID( $flags=0)
Get the article ID for this Title from the link cache, adding it if necessary.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
static newFromAnyId( $userId, $userName, $actorId)
Static factory method for creation from an ID, name, and/or actor ID.
static newFromId( $id)
Static factory method for creation from a given user ID.
static newFromActorId( $id)
Static factory method for creation from a given actor ID.
static factory(Title $title)
Create a WikiPage object of the appropriate class for the given title.
when a variable name is used in a it is silently declared as a new local masking the global
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
const MIGRATION_WRITE_BOTH
the array() calling protocol came about after MediaWiki 1.4rc1.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults error
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account incomplete not yet checked for validity & $retval
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a message
return true to allow those checks to and false if checking is done remove or add to the links of a group of changes in EnhancedChangesList Hook subscribers can return false to omit this line from recentchanges use this to change the tables headers change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped true if there is text before this autocomment $auto
passed in as a query string parameter to the various URLs constructed here(i.e. $prevlink) $ldel you ll need to handle error etc yourself modifying $error and returning true will cause the contents of $error to be echoed at the top of the edit form as wikitext Return true without altering $error to allow the edit to proceed & $editor
namespace and then decline to actually register it file or subcat img or subcat $title
null for the local wiki Added in
Allows to change the fields on the form that will be generated $name
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing & $attribs
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account $user
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php