28use InvalidArgumentException;
86 $this->lagDetectionMethod = isset(
$params[
'lagDetectionMethod'] )
88 :
'Seconds_Behind_Master';
89 $this->lagDetectionOptions = isset(
$params[
'lagDetectionOptions'] )
90 ?
$params[
'lagDetectionOptions']
92 $this->useGTIDs = !empty(
$params[
'useGTIDs' ] );
93 foreach ( [
'KeyPath',
'CertPath',
'CAFile',
'CAPath',
'Ciphers' ] as $name ) {
99 $this->sqlMode = isset(
$params[
'sqlMode'] ) ?
$params[
'sqlMode'] :
'';
100 $this->utf8Mode = !empty(
$params[
'utf8Mode'] );
102 parent::__construct(
$params );
120 public function open( $server, $user, $password, $dbName ) {
121 # Close/unset connection handle
124 $this->mServer = $server;
125 $this->mUser =
$user;
126 $this->mPassword = $password;
127 $this->mDBname = $dbName;
132 }
catch ( Exception $ex ) {
138 # Always log connection errors
139 if ( !$this->mConn ) {
143 $this->connLogger->error(
144 "Error connecting to {db_server}: {error}",
146 'method' => __METHOD__,
150 $this->connLogger->debug(
"DB connection error\n" .
151 "Server: $server, User: $user, Password: " .
152 substr( $password, 0, 3 ) .
"..., error: " . $error .
"\n" );
157 if ( $dbName !=
'' ) {
158 MediaWiki\suppressWarnings();
160 MediaWiki\restoreWarnings();
162 $this->queryLogger->error(
163 "Error selecting database {db_name} on server {db_server}",
165 'method' => __METHOD__,
168 $this->queryLogger->debug(
169 "Error selecting database $dbName on server {$this->mServer}" );
181 $set = [
'group_concat_max_len = 262144' ];
183 if ( is_string( $this->sqlMode ) ) {
184 $set[] =
'sql_mode = ' . $this->
addQuotes( $this->sqlMode );
188 foreach ( $this->mSessionVars as $var => $val ) {
190 if ( !is_int( $val ) && !is_float( $val ) ) {
200 $this->queryLogger->error(
201 'Error setting MySQL variables on server {db_server} (check $wgSQLMode)',
203 'method' => __METHOD__,
207 'Error setting MySQL variables on server {db_server} (check $wgSQLMode)' );
211 $this->mOpened =
true;
221 if ( $this->utf8Mode ) {
255 MediaWiki\suppressWarnings();
257 MediaWiki\restoreWarnings();
280 MediaWiki\suppressWarnings();
282 MediaWiki\restoreWarnings();
289 if ( $errno == 2000 || $errno == 2013 ) {
292 'Error in fetchObject(): ' . htmlspecialchars( $this->
lastError() )
316 MediaWiki\suppressWarnings();
318 MediaWiki\restoreWarnings();
325 if ( $errno == 2000 || $errno == 2013 ) {
328 'Error in fetchRow(): ' . htmlspecialchars( $this->
lastError() )
352 MediaWiki\suppressWarnings();
354 MediaWiki\restoreWarnings();
463 if ( $this->mConn ) {
464 # Even if it's non-zero, it can still be invalid
465 MediaWiki\suppressWarnings();
470 MediaWiki\restoreWarnings();
475 $error .=
' (' . $this->mServer .
')';
517 if (
$res ===
false ) {
525 foreach (
$res as $plan ) {
526 $rows *= $plan->rows > 0 ? $plan->rows : 1;
536 $tableName =
"{$prefix}{$table}";
538 if ( isset( $this->mSessionTempTables[$tableName] ) ) {
547 if ( $database !==
'' ) {
549 $query =
"SHOW TABLES FROM $encDatabase LIKE '$encLike'";
551 $query =
"SHOW TABLES LIKE '$encLike'";
564 $res = $this->
query(
"SELECT * FROM $table LIMIT 1", __METHOD__,
true );
569 for ( $i = 0; $i < $n; $i++ ) {
571 if ( $field == $meta->name ) {
598 # SHOW INDEX works in MySQL 3.23.58, but SHOW INDEXES does not.
599 # SHOW INDEX should work for 3.x and up:
604 $sql =
'SHOW INDEX FROM ' . $table;
613 foreach (
$res as $row ) {
614 if ( $row->Key_name == $index ) {
637 if ( is_bool(
$s ) ) {
643 return parent::addQuotes(
$s );
655 return '`' . str_replace( [
"\0",
'`' ], [
'',
'``' ],
$s ) .
'`';
663 return strlen( $name ) && $name[0] ==
'`' && substr( $name, -1, 1 ) ==
'`';
685 $res = $this->
query(
'SHOW SLAVE STATUS', __METHOD__ );
686 $row =
$res ?
$res->fetchObject() :
false;
687 if ( $row && strval( $row->Seconds_Behind_Master ) !==
'' ) {
688 return intval( $row->Seconds_Behind_Master );
706 if ( !$masterInfo ) {
707 $this->queryLogger->error(
708 "Unable to query master of {db_server} for server ID",
710 'method' => __METHOD__
717 $conds = [
'server_id' => intval( $masterInfo[
'serverId'] ) ];
722 if (
$time !==
null ) {
724 $dateTime =
new DateTime(
$time,
new DateTimeZone(
'UTC' ) );
725 $timeUnix = (int)$dateTime->format(
'U' ) + $dateTime->format(
'u' ) / 1e6;
727 return max( $nowUnix - $timeUnix, 0.0 );
730 $this->queryLogger->error(
731 "Unable to find pt-heartbeat row for {db_server}",
733 'method' => __METHOD__
749 return $cache->getWithSetCallback(
751 $cache::TTL_INDEFINITE,
754 if ( !
$cache->lock( $key, 0, 10 ) ) {
765 $res = $conn->query(
'SELECT @@server_id AS id', __METHOD__ );
766 $row =
$res ?
$res->fetchObject() :
false;
767 $id = $row ? (int)$row->id : 0;
773 return $id ? [
'serverId' => $id,
'asOf' => time() ] :
false;
785 $nowUnix = microtime(
true );
787 $this->
clearFlag( self::DBO_TRX, self::REMEMBER_PRIOR );
789 $whereSQL = $this->
makeList( $conds, self::LIST_AND );
794 "SELECT ts FROM heartbeat.heartbeat WHERE $whereSQL ORDER BY ts DESC LIMIT 1"
796 $row =
$res ?
$res->fetchObject() :
false;
801 return [ $row ? $row->ts :
null, $nowUnix ];
809 return parent::getApproximateLagStatus();
812 $key = $this->srvCache->makeGlobalKey(
'mysql-lag', $this->
getServer() );
813 $approxLag = $this->srvCache->get( $key );
815 $approxLag = parent::getApproximateLagStatus();
816 $this->srvCache->set( $key, $approxLag, 1 );
824 throw new InvalidArgumentException(
"Position not an instance of MySQLMasterPos" );
827 if ( $this->
getLBInfo(
'is static' ) ===
true ) {
829 } elseif ( $this->lastKnownReplicaPos && $this->lastKnownReplicaPos->hasReached( $pos ) ) {
834 if ( $this->useGTIDs && $pos->gtids ) {
836 $gtidArg = $this->
addQuotes( implode(
',', $pos->gtids ) );
837 $res = $this->
doQuery(
"SELECT MASTER_GTID_WAIT($gtidArg, $timeout)" );
840 $encFile = $this->
addQuotes( $pos->file );
841 $encPos = intval( $pos->pos );
842 $res = $this->
doQuery(
"SELECT MASTER_POS_WAIT($encFile, $encPos, $timeout)" );
848 "MASTER_POS_WAIT() or MASTER_GTID_WAIT() failed: {$this->lastError()}" );
852 $status = ( $row[0] !== null ) ? intval( $row[0] ) :
null;
859 if ( $replicationPos && !$replicationPos->channelsMatch( $pos ) ) {
860 $this->lastKnownReplicaPos = $replicationPos;
865 $this->lastKnownReplicaPos = $pos;
877 $res = $this->
query(
'SHOW SLAVE STATUS', __METHOD__ );
881 $pos = isset( $row->Exec_master_log_pos )
882 ? $row->Exec_master_log_pos
883 : $row->Exec_Master_Log_Pos;
885 if ( $this->useGTIDs ) {
886 $res = $this->
query(
"SHOW GLOBAL VARIABLES LIKE 'gtid_slave_pos'", __METHOD__ );
888 $gtidSet = $gtidRow ? $gtidRow->Value :
'';
893 return new MySQLMasterPos( $row->Relay_Master_Log_File, $pos, $gtidSet );
905 $res = $this->
query(
'SHOW MASTER STATUS', __METHOD__ );
910 if ( $this->useGTIDs ) {
911 $res = $this->
query(
"SHOW GLOBAL VARIABLES LIKE 'gtid_binlog_pos'", __METHOD__ );
913 $gtidSet = $gtidRow ? $gtidRow->Value :
'';
918 return new MySQLMasterPos( $row->File, $row->Position, $gtidSet );
925 $res = $this->
query(
"SHOW GLOBAL VARIABLES LIKE 'read_only'", __METHOD__ );
928 return $row ? ( strtolower( $row->Value ) ===
'on' ) :
false;
936 return "FORCE INDEX (" . $this->
indexName( $index ) .
")";
944 return "IGNORE INDEX (" . $this->
indexName( $index ) .
")";
951 return 'LOW_PRIORITY';
962 if ( strpos( $version,
'MariaDB' ) !==
false || strpos( $version,
'-maria-' ) !==
false ) {
963 return '[{{int:version-db-mariadb-url}} MariaDB]';
969 return '[{{int:version-db-mysql-url}} MySQL]';
979 if ( $this->serverVersion ===
null ) {
980 $this->serverVersion = $this->
selectField(
'',
'VERSION()',
'', __METHOD__ );
989 if ( isset(
$options[
'connTimeout'] ) ) {
990 $timeout = (int)
$options[
'connTimeout'];
991 $this->
query(
"SET net_read_timeout=$timeout" );
992 $this->
query(
"SET net_write_timeout=$timeout" );
1002 if ( strtoupper( substr( $newLine, 0, 9 ) ) ==
'DELIMITER' ) {
1003 preg_match(
'/^DELIMITER\s+(\S+)/', $newLine, $m );
1004 $this->delimiter = $m[1];
1008 return parent::streamStatementEnd( $sql, $newLine );
1021 $result = $this->
query(
"SELECT IS_FREE_LOCK($encName) AS lockstatus", $method );
1024 return ( $row->lockstatus == 1 );
1033 public function lock( $lockName, $method, $timeout = 5 ) {
1035 $result = $this->
query(
"SELECT GET_LOCK($encName, $timeout) AS lockstatus", $method );
1038 if ( $row->lockstatus == 1 ) {
1039 parent::lock( $lockName, $method, $timeout );
1043 $this->queryLogger->warning( __METHOD__ .
" failed to acquire lock '$lockName'\n" );
1055 public function unlock( $lockName, $method ) {
1057 $result = $this->
query(
"SELECT RELEASE_LOCK($encName) as lockstatus", $method );
1060 if ( $row->lockstatus == 1 ) {
1061 parent::unlock( $lockName, $method );
1065 $this->queryLogger->warning( __METHOD__ .
" failed to release lock '$lockName'\n" );
1073 return ( strlen( $lockName ) > 64 ) ? sha1( $lockName ) : $lockName;
1086 foreach ( $write as $table ) {
1087 $items[] = $this->
tableName( $table ) .
' WRITE';
1089 foreach ( $read as $table ) {
1090 $items[] = $this->
tableName( $table ) .
' READ';
1093 $sql =
"LOCK TABLES " . implode(
',', $items );
1094 $this->
query( $sql, $method );
1100 $this->
query(
"UNLOCK TABLES", $method );
1109 if (
$value ===
'default' ) {
1110 if ( $this->mDefaultBigSelects ===
null ) {
1111 # Function hasn't been called before so it must already be set to the default
1116 } elseif ( $this->mDefaultBigSelects ===
null ) {
1117 $this->mDefaultBigSelects =
1118 (bool)$this->
selectField(
false,
'@@sql_big_selects',
'', __METHOD__ );
1120 $encValue =
$value ?
'1' :
'0';
1121 $this->
query(
"SET sql_big_selects=$encValue", __METHOD__ );
1136 $delTable, $joinTable, $delVar, $joinVar, $conds,
$fname = __METHOD__
1142 $delTable = $this->
tableName( $delTable );
1143 $joinTable = $this->
tableName( $joinTable );
1144 $sql =
"DELETE $delTable FROM $delTable, $joinTable WHERE $delVar=$joinVar ";
1146 if ( $conds !=
'*' ) {
1147 $sql .=
' AND ' . $this->
makeList( $conds, self::LIST_AND );
1162 array $set,
$fname = __METHOD__
1164 if ( !count(
$rows ) ) {
1168 if ( !is_array( reset(
$rows ) ) ) {
1173 $columns = array_keys(
$rows[0] );
1175 $sql =
"INSERT INTO $table (" . implode(
',', $columns ) .
') VALUES ';
1177 foreach (
$rows as $row ) {
1178 $rowTuples[] =
'(' . $this->
makeList( $row ) .
')';
1180 $sql .= implode(
',', $rowTuples );
1181 $sql .=
" ON DUPLICATE KEY UPDATE " . $this->
makeList( $set, self::LIST_SET );
1194 return (
int)
$vars[
'Uptime'];
1230 return $errno == 2013 || $errno == 2006;
1241 $oldName, $newName, $temporary =
false,
$fname = __METHOD__
1243 $tmp = $temporary ?
'TEMPORARY ' :
'';
1246 $query =
"CREATE $tmp TABLE $newName (LIKE $oldName)";
1263 foreach ( $result as $table ) {
1264 $vars = get_object_vars( $table );
1265 $table = array_pop(
$vars );
1267 if ( !$prefix || strpos( $table, $prefix ) === 0 ) {
1268 $endArray[] = $table;
1280 public function dropTable( $tableName, $fName = __METHOD__ ) {
1281 if ( !$this->
tableExists( $tableName, $fName ) ) {
1285 return $this->
query(
"DROP TABLE IF EXISTS " . $this->
tableName( $tableName ), $fName );
1295 $res = $this->
query(
"SHOW STATUS LIKE '{$which}'" );
1298 foreach (
$res as $row ) {
1299 $status[$row->Variable_name] = $row->Value;
1319 $res = $this->
query(
'SHOW FULL TABLES WHERE TABLE_TYPE = "VIEW"' );
1321 foreach (
$res as $row ) {
1322 array_push( $allViews, $row->$propertyName );
1325 if ( is_null( $prefix ) || $prefix ===
'' ) {
1329 $filteredViews = [];
1330 foreach ( $allViews as $viewName ) {
1332 if ( strpos( $viewName, $prefix ) === 0 ) {
1333 array_push( $filteredViews, $viewName );
1337 return $filteredViews;
1348 public function isView( $name, $prefix =
null ) {
1349 return in_array( $name, $this->
listViews( $prefix ) );
1374 'ar_usertext_timestamp' =>
'usertext_timestamp',
1375 'un_user_id' =>
'user_id',
1376 'un_user_ip' =>
'user_ip',
1379 if ( isset( $renamed[$index] ) ) {
1380 return $renamed[$index];
1387class_alias( DatabaseMysqlBase::class,
'DatabaseMysqlBase' );
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
makeGlobalKey()
Make a global cache key.
We use the convention $dbr for read and $dbw for write to help you keep track of whether the database object is a the world will explode Or to be a subsequent write query which succeeded on the master may fail when replicated to the slave due to a unique key collision Replication on the slave will stop and it may take hours to repair the database and get it back online Setting read_only in my cnf on the slave will avoid this but given the dire we prefer to have as many checks as possible We provide a but the wrapper functions like select() and insert() are usually more convenient. They take care of things like table prefixes and escaping for you. If you really need to make your own SQL
We use the convention $dbr for read and $dbw for write to help you keep track of whether the database object is a the world will explode Or to be a subsequent write query which succeeded on the master may fail when replicated to the slave due to a unique key collision Replication on the slave will stop and it may take hours to repair the database and get it back online Setting read_only in my cnf on the slave will avoid this but given the dire we prefer to have as many checks as possible We provide a but the wrapper functions like please read the documentation for tableName() and addQuotes(). You will need both of them. ------------------------------------------------------------------------ Basic query optimisation ------------------------------------------------------------------------ MediaWiki developers who need to write DB queries should have some understanding of databases and the performance issues associated with them. Patches containing unacceptably slow features will not be accepted. Unindexed queries are generally not welcome in MediaWiki
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
static configuration should be added through ResourceLoaderGetConfigVars instead & $vars
namespace being checked & $result
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 also a ContextSource after deleting those rows but within the same transaction $rows
see documentation in includes Linker php for Linker::makeImageLink & $time
This code would result in ircNotify being run twice when an article is and once for brion Hooks can return three possible true was required This is the default since MediaWiki *some string
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 & $options
Status::newGood()` to allow deletion, and then `return false` from the hook function. Ensure you consume the 'ChangeTagAfterDelete' hook to carry out custom deletion actions. $tag:name of the tag $user:user initiating the action & $status:Status object. See above. 'ChangeTagsListActive':Allows you to nominate which of the tags your extension uses are in active use. & $tags:list of all active tags. Append to this array. 'ChangeTagsAfterUpdateTags':Called after tags have been updated with the ChangeTags::updateTags function. Params:$addedTags:tags effectively added in the update $removedTags:tags effectively removed in the update $prevTags:tags that were present prior to the update $rc_id:recentchanges table id $rev_id:revision table id $log_id:logging table id $params:tag params $rc:RecentChange being tagged when the tagging accompanies the action or null $user:User who performed the tagging when the tagging is subsequent to the action or null 'ChangeTagsAllowedAdd':Called when checking if a user can add tags to a change. & $allowedTags:List of all the tags the user is allowed to add. Any tags the user wants to add( $addTags) that are not in this array will cause it to fail. You may add or remove tags to this array as required. $addTags:List of tags user intends to add. $user:User who is adding the tags. 'ChangeUserGroups':Called before user groups are changed. $performer:The User who will perform the change $user:The User whose groups will be changed & $add:The groups that will be added & $remove:The groups that will be removed 'Collation::factory':Called if $wgCategoryCollation is an unknown collation. $collationName:Name of the collation in question & $collationObject:Null. Replace with a subclass of the Collation class that implements the collation given in $collationName. 'ConfirmEmailComplete':Called after a user 's email has been confirmed successfully. $user:user(object) whose email is being confirmed 'ContentAlterParserOutput':Modify parser output for a given content object. Called by Content::getParserOutput after parsing has finished. Can be used for changes that depend on the result of the parsing but have to be done before LinksUpdate is called(such as adding tracking categories based on the rendered HTML). $content:The Content to render $title:Title of the page, as context $parserOutput:ParserOutput to manipulate 'ContentGetParserOutput':Customize parser output for a given content object, called by AbstractContent::getParserOutput. May be used to override the normal model-specific rendering of page content. $content:The Content to render $title:Title of the page, as context $revId:The revision ID, as context $options:ParserOptions for rendering. To avoid confusing the parser cache, the output can only depend on parameters provided to this hook function, not on global state. $generateHtml:boolean, indicating whether full HTML should be generated. If false, generation of HTML may be skipped, but other information should still be present in the ParserOutput object. & $output:ParserOutput, to manipulate or replace 'ContentHandlerDefaultModelFor':Called when the default content model is determined for a given title. May be used to assign a different model for that title. $title:the Title in question & $model:the model name. Use with CONTENT_MODEL_XXX constants. 'ContentHandlerForModelID':Called when a ContentHandler is requested for a given content model name, but no entry for that model exists in $wgContentHandlers. Note:if your extension implements additional models via this hook, please use GetContentModels hook to make them known to core. $modeName:the requested content model name & $handler:set this to a ContentHandler object, if desired. 'ContentModelCanBeUsedOn':Called to determine whether that content model can be used on a given page. This is especially useful to prevent some content models to be used in some special location. $contentModel:ID of the content model in question $title:the Title in question. & $ok:Output parameter, whether it is OK to use $contentModel on $title. Handler functions that modify $ok should generally return false to prevent further hooks from further modifying $ok. 'ContribsPager::getQueryInfo':Before the contributions query is about to run & $pager:Pager object for contributions & $queryInfo:The query for the contribs Pager 'ContribsPager::reallyDoQuery':Called before really executing the query for My Contributions & $data:an array of results of all contribs queries $pager:The ContribsPager object hooked into $offset:Index offset, inclusive $limit:Exact query limit $descending:Query direction, false for ascending, true for descending 'ContributionsLineEnding':Called before a contributions HTML line is finished $page:SpecialPage object for contributions & $ret:the HTML line $row:the DB row for this line & $classes:the classes to add to the surrounding< li > & $attribs:associative array of other HTML attributes for the< li > element. Currently only data attributes reserved to MediaWiki are allowed(see Sanitizer::isReservedDataAttribute). 'ContributionsToolLinks':Change tool links above Special:Contributions $id:User identifier $title:User page title & $tools:Array of tool links $specialPage:SpecialPage instance for context and services. Can be either SpecialContributions or DeletedContributionsPage. Extensions should type hint against a generic SpecialPage though. 'ConvertContent':Called by AbstractContent::convert when a conversion to another content model is requested. Handler functions that modify $result should generally return false to disable further attempts at conversion. $content:The Content object to be converted. $toModel:The ID of the content model to convert to. $lossy: boolean indicating whether lossy conversion is allowed. & $result:Output parameter, in case the handler function wants to provide a converted Content object. Note that $result->getContentModel() must return $toModel. 'CustomEditor':When invoking the page editor Return true to allow the normal editor to be used, or false if implementing a custom editor, e.g. for a special namespace, etc. $article:Article being edited $user:User performing the edit 'DatabaseOraclePostInit':Called after initialising an Oracle database $db:the DatabaseOracle object 'DeletedContribsPager::reallyDoQuery':Called before really executing the query for Special:DeletedContributions Similar to ContribsPager::reallyDoQuery & $data:an array of results of all contribs queries $pager:The DeletedContribsPager object hooked into $offset:Index offset, inclusive $limit:Exact query limit $descending:Query direction, false for ascending, true for descending 'DeletedContributionsLineEnding':Called before a DeletedContributions HTML line is finished. Similar to ContributionsLineEnding $page:SpecialPage object for DeletedContributions & $ret:the HTML line $row:the DB row for this line & $classes:the classes to add to the surrounding< li > & $attribs:associative array of other HTML attributes for the< li > element. Currently only data attributes reserved to MediaWiki are allowed(see Sanitizer::isReservedDataAttribute). 'DifferenceEngineAfterLoadNewText':called in DifferenceEngine::loadNewText() after the new revision 's content has been loaded into the class member variable $differenceEngine->mNewContent but before returning true from this function. $differenceEngine:DifferenceEngine object 'DifferenceEngineLoadTextAfterNewContentIsLoaded':called in DifferenceEngine::loadText() after the new revision 's content has been loaded into the class member variable $differenceEngine->mNewContent but before checking if the variable 's value is null. This hook can be used to inject content into said class member variable. $differenceEngine:DifferenceEngine object 'DifferenceEngineMarkPatrolledLink':Allows extensions to change the "mark as patrolled" link which is shown both on the diff header as well as on the bottom of a page, usually wrapped in a span element which has class="patrollink". $differenceEngine:DifferenceEngine object & $markAsPatrolledLink:The "mark as patrolled" link HTML(string) $rcid:Recent change ID(rc_id) for this change(int) 'DifferenceEngineMarkPatrolledRCID':Allows extensions to possibly change the rcid parameter. For example the rcid might be set to zero due to the user being the same as the performer of the change but an extension might still want to show it under certain conditions. & $rcid:rc_id(int) of the change or 0 $differenceEngine:DifferenceEngine object $change:RecentChange object $user:User object representing the current user 'DifferenceEngineNewHeader':Allows extensions to change the $newHeader variable, which contains information about the new revision, such as the revision 's author, whether the revision was marked as a minor edit or not, etc. $differenceEngine:DifferenceEngine object & $newHeader:The string containing the various #mw-diff-otitle[1-5] divs, which include things like revision author info, revision comment, RevisionDelete link and more $formattedRevisionTools:Array containing revision tools, some of which may have been injected with the DiffRevisionTools hook $nextlink:String containing the link to the next revision(if any) $status
null for the local wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
processing should stop and the error should be shown to the user * false
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
returning false will NOT prevent logging $e