Go to the documentation of this file.
57 global $wgAllDBsAreLocalhost, $wgSQLMode;
60 # Debugging hack -- fake cluster
61 if ( $wgAllDBsAreLocalhost ) {
62 $realServer =
'localhost';
64 $realServer = $server;
67 $this->mServer = $server;
70 $this->mDBname = $dbName;
74 # The kernel's default SYN retransmission period is far too slow for us,
75 # so we use a short timeout plus a manual retry. Retrying means that a small
76 # but finite rate of SYN packet loss won't cause user-visible errors.
81 }
catch ( Exception $ex ) {
91 # Always log connection errors
92 if ( !$this->mConn ) {
96 wfLogDBError(
"Error connecting to {$this->mServer}: $error" );
97 wfDebug(
"DB connection error\n" .
98 "Server: $server, User: $user, Password: " .
106 if ( $dbName !=
'' ) {
111 wfLogDBError(
"Error selecting database $dbName on server {$this->mServer}" );
112 wfDebug(
"Error selecting database $dbName on server {$this->mServer} " .
127 if ( is_string( $wgSQLMode ) ) {
132 wfLogDBError(
"Error setting sql_mode to $mode on server {$this->mServer}" );
138 $this->mOpened =
true;
167 abstract protected function mysqlConnect( $realServer );
219 if ( $errno == 2000 || $errno == 2013 ) {
222 'Error in fetchObject(): ' . htmlspecialchars( $this->
lastError() )
255 if ( $errno == 2000 || $errno == 2013 ) {
258 'Error in fetchRow(): ' . htmlspecialchars( $this->
lastError() )
393 if ( $this->mConn ) {
394 # Even if it's non-zero, it can still be invalid
405 $error .=
' (' . $this->mServer .
')';
417 abstract protected function mysqlError( $conn =
null );
426 function replace( $table, $uniqueIndexes, $rows,
$fname = __METHOD__ ) {
447 if (
$res ===
false ) {
455 foreach (
$res as $plan ) {
456 $rows *= $plan->rows > 0 ? $plan->rows : 1;
469 $res = $this->
query(
"SELECT * FROM $table LIMIT 1", __METHOD__,
true );
474 for ( $i = 0; $i <
$n; $i++ ) {
476 if ( $field == $meta->name ) {
503 # SHOW INDEX works in MySQL 3.23.58, but SHOW INDEXES does not.
504 # SHOW INDEX should work for 3.x and up:
505 # http://dev.mysql.com/doc/mysql/en/SHOW_INDEX.html
509 $sql =
'SHOW INDEX FROM ' . $table;
518 foreach (
$res as $row ) {
519 if ( $row->Key_name == $index ) {
532 $sQuoted = $this->mysqlRealEscapeString(
$s );
534 if ( $sQuoted ===
false ) {
536 $sQuoted = $this->mysqlRealEscapeString(
$s );
551 return '`' . str_replace(
array(
"\0",
'`' ),
array(
'',
'``' ),
$s ) .
'`';
559 return strlen(
$name ) &&
$name[0] ==
'`' && substr(
$name, -1, 1 ) ==
'`';
572 $this->mOpened =
false;
573 $this->mConn =
false;
574 $this->
open( $this->mServer, $this->mUser, $this->mPassword, $this->mDBname );
592 $this->mFakeSlaveLag = $lag;
601 $this->mFakeMaster = $enabled;
612 if ( !is_null( $this->mFakeSlaveLag ) ) {
613 wfDebug(
"getLag: fake slave lagged {$this->mFakeSlaveLag} seconds\n" );
625 $res = $this->
query(
'SHOW SLAVE STATUS', __METHOD__ );
629 $row =
$res->fetchObject();
633 if ( strval( $row->Seconds_Behind_Master ) ===
'' ) {
636 return intval( $row->Seconds_Behind_Master );
647 $res = $this->
query(
'SHOW PROCESSLIST', __METHOD__ );
651 # Find slave SQL thread
652 foreach (
$res as $row ) {
659 if ( $row->User ==
'system user' &&
660 $row->State !=
'Waiting for master to send event' &&
661 $row->State !=
'Connecting to master' &&
662 $row->State !=
'Queueing master event to the relay log' &&
663 $row->State !=
'Waiting for master update' &&
664 $row->State !=
'Requesting binlog dump' &&
665 $row->State !=
'Waiting to reconnect after a failed master event read' &&
666 $row->State !=
'Reconnecting after a failed master event read' &&
667 $row->State !=
'Registering slave on master'
669 # This is it, return the time (except -ve)
670 if ( $row->Time > 0x7fffffff ) {
692 if ( $this->lastKnownSlavePos && $this->lastKnownSlavePos->hasReached( $pos ) ) {
697 # Commit any open transactions
698 $this->
commit( __METHOD__,
'flush' );
700 if ( !is_null( $this->mFakeSlaveLag ) ) {
701 $wait = intval( ( $pos->pos - microtime(
true ) + $this->mFakeSlaveLag ) * 1e6 );
703 if (
$wait > $timeout * 1e6 ) {
704 wfDebug(
"Fake slave timed out waiting for $pos ($wait us)\n" );
708 } elseif (
$wait > 0 ) {
709 wfDebug(
"Fake slave waiting $wait us\n" );
715 wfDebug(
"Fake slave up to date ($wait us)\n" );
722 # Call doQuery() directly, to avoid opening a transaction if DBO_TRX is set
723 $encFile = $this->
addQuotes( $pos->file );
724 $encPos = intval( $pos->pos );
725 $sql =
"SELECT MASTER_POS_WAIT($encFile, $encPos, $timeout)";
731 if ( ctype_digit( $status ) ) {
732 $this->lastKnownSlavePos = $pos;
747 if ( !is_null( $this->mFakeSlaveLag ) ) {
748 $pos =
new MySQLMasterPos(
'fake', microtime(
true ) - $this->mFakeSlaveLag );
749 wfDebug( __METHOD__ .
": fake slave pos = $pos\n" );
754 $res = $this->
query(
'SHOW SLAVE STATUS',
'DatabaseBase::getSlavePos' );
758 $pos = isset( $row->Exec_master_log_pos )
759 ? $row->Exec_master_log_pos
760 : $row->Exec_Master_Log_Pos;
774 if ( $this->mFakeMaster ) {
778 $res = $this->
query(
'SHOW MASTER STATUS',
'DatabaseBase::getMasterPos' );
793 return "FORCE INDEX (" . $this->
indexName( $index ) .
")";
800 return 'LOW_PRIORITY';
811 if ( strpos(
$version,
'MariaDB' ) !==
false || strpos(
$version,
'-maria-' ) !==
false ) {
812 return '[{{int:version-db-mariadb-url}} MariaDB]';
818 return '[{{int:version-db-mysql-url}} MySQL]';
825 if ( isset(
$options[
'connTimeout'] ) ) {
826 $timeout = (int)
$options[
'connTimeout'];
827 $this->
query(
"SET net_read_timeout=$timeout" );
828 $this->
query(
"SET net_write_timeout=$timeout" );
838 if ( strtoupper( substr( $newLine, 0, 9 ) ) ==
'DELIMITER' ) {
839 preg_match(
'/^DELIMITER\s+(\S+)/', $newLine, $m );
840 $this->delimiter = $m[1];
844 return parent::streamStatementEnd( $sql, $newLine );
855 public function lockIsFree( $lockName, $method ) {
856 $lockName = $this->
addQuotes( $lockName );
857 $result = $this->
query(
"SELECT IS_FREE_LOCK($lockName) AS lockstatus", $method );
860 return ( $row->lockstatus == 1 );
869 public function lock( $lockName, $method, $timeout = 5 ) {
870 $lockName = $this->
addQuotes( $lockName );
871 $result = $this->
query(
"SELECT GET_LOCK($lockName, $timeout) AS lockstatus", $method );
874 if ( $row->lockstatus == 1 ) {
877 wfDebug( __METHOD__ .
" failed to acquire lock\n" );
890 public function unlock( $lockName, $method ) {
891 $lockName = $this->
addQuotes( $lockName );
892 $result = $this->
query(
"SELECT RELEASE_LOCK($lockName) as lockstatus", $method );
895 return ( $row->lockstatus == 1 );
905 public function lockTables( $read, $write, $method, $lowPriority =
true ) {
908 foreach ( $write
as $table ) {
910 ( $lowPriority ?
' LOW_PRIORITY' :
'' ) .
914 foreach ( $read
as $table ) {
915 $items[] = $this->
tableName( $table ) .
' READ';
917 $sql =
"LOCK TABLES " . implode(
',', $items );
918 $this->
query( $sql, $method );
928 $this->
query(
"UNLOCK TABLES", $method );
940 return 'SearchMySQL';
948 if (
$value ===
'default' ) {
949 if ( $this->mDefaultBigSelects ===
null ) {
950 # Function hasn't been called before so it must already be set to the default
955 } elseif ( $this->mDefaultBigSelects ===
null ) {
956 $this->mDefaultBigSelects = (bool)$this->
selectField(
false,
'@@sql_big_selects' );
958 $encValue =
$value ?
'1' :
'0';
959 $this->
query(
"SET sql_big_selects=$encValue", __METHOD__ );
973 function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds,
$fname = __METHOD__ ) {
975 throw new DBUnexpectedError( $this,
'DatabaseBase::deleteJoin() called with empty $conds' );
978 $delTable = $this->
tableName( $delTable );
979 $joinTable = $this->
tableName( $joinTable );
980 $sql =
"DELETE $delTable FROM $delTable, $joinTable WHERE $delVar=$joinVar ";
982 if ( $conds !=
'*' ) {
1000 if ( !count( $rows ) ) {
1004 if ( !is_array( reset( $rows ) ) ) {
1005 $rows =
array( $rows );
1011 $sql =
"INSERT INTO $table (" . implode(
',',
$columns ) .
') VALUES ';
1012 $rowTuples =
array();
1013 foreach ( $rows
as $row ) {
1014 $rowTuples[] =
'(' . $this->
makeList( $row ) .
')';
1016 $sql .= implode(
',', $rowTuples );
1030 return (
int)
$vars[
'Uptime'];
1079 $tmp = $temporary ?
'TEMPORARY ' :
'';
1082 $query =
"CREATE $tmp TABLE $newName (LIKE $oldName)";
1097 $endArray =
array();
1100 $vars = get_object_vars( $table );
1101 $table = array_pop(
$vars );
1103 if ( !$prefix || strpos( $table, $prefix ) === 0 ) {
1104 $endArray[] = $table;
1116 public function dropTable( $tableName, $fName = __METHOD__ ) {
1117 if ( !$this->
tableExists( $tableName, $fName ) ) {
1121 return $this->
query(
"DROP TABLE IF EXISTS " . $this->
tableName( $tableName ), $fName );
1128 $vars = parent::getDefaultSchemaVars();
1129 $vars[
'wgDBTableOptions'] = str_replace(
'TYPE',
'ENGINE',
$GLOBALS[
'wgDBTableOptions'] );
1130 $vars[
'wgDBTableOptions'] = str_replace(
1133 $vars[
'wgDBTableOptions']
1146 $res = $this->
query(
"SHOW STATUS LIKE '{$which}'" );
1149 foreach (
$res as $row ) {
1150 $status[$row->Variable_name] = $row->Value;
1167 if ( !isset( $this->allViews ) ) {
1173 $result = $this->
query(
'SHOW FULL TABLES WHERE TABLE_TYPE = "VIEW"' );
1174 $this->allViews =
array();
1176 array_push( $this->allViews, $row[$propertyName] );
1180 if ( is_null( $prefix ) || $prefix ===
'' ) {
1184 $filteredViews =
array();
1185 foreach ( $this->allViews
as $viewName ) {
1187 if ( strpos( $viewName, $prefix ) === 0 ) {
1188 array_push( $filteredViews, $viewName );
1192 return $filteredViews;
1217 $this->
name = $info->name;
1218 $this->tablename = $info->table;
1219 $this->
default = $info->def;
1220 $this->max_length = $info->max_length;
1221 $this->nullable = !$info->not_null;
1222 $this->is_pk = $info->primary_key;
1223 $this->is_unique = $info->unique_key;
1224 $this->is_multiple = $info->multiple_key;
1226 $this->
type = $info->type;
1227 $this->binary = isset( $info->binary ) ? $info->binary :
false;
1241 return $this->tableName;
1295 return "{$this->file}/{$this->pos}";
1303 if ( preg_match(
'!\.(\d+)/(\d+)$!', (
string)$this, $m ) ) {
1304 return array( (
int)$m[1], (
int)$m[2] );
1312 $thatPos =
$pos->getCoordinates();
1314 return ( $thisPos && $thatPos && $thisPos >= $thatPos );
masterPosWait(DBMasterPos $pos, $timeout)
Wait for the slave to catch up to a given master position.
tableName( $name, $format='quoted')
Format a table name ready for use in constructing an SQL query.
Database abstraction object for MySQL.
streamStatementEnd(&$sql, &$newLine)
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. $reader:XMLReader object $logInfo:Array of information Return false to stop further processing of the tag 'ImportHandlePageXMLTag':When parsing a XML tag in a page. $reader:XMLReader object $pageInfo:Array of information Return false to stop further processing of the tag 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information Return false to stop further processing of the tag 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. $reader:XMLReader object Return false to stop further processing of the tag 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. $reader:XMLReader object $revisionInfo:Array of information Return false to stop further processing of the tag 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. $title:Title object for the current page $request:WebRequest $ignoreRedirect:boolean to skip redirect check $target:Title/string of redirect target $article:Article object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) $article:article(object) being checked 'IsTrustedProxy':Override the result of wfIsTrustedProxy() $ip:IP being check $result:Change this value to override the result of wfIsTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of User::isValidEmailAddr(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetMagic':DEPRECATED, use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetSpecialPageAliases':DEPRECATED, use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Associative array mapping language codes to prefixed links of the form "language:title". & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LinkBegin':Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
reportConnectionError( $error='Unknown error')
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
listViews( $prefix=null, $fname=__METHOD__)
Lists VIEWs in the database.
getMasterPos()
Get the position of the master from SHOW MASTER STATUS.
listTables( $prefix=null, $fname=__METHOD__)
List all tables on the database.
Base for all database-specific classes representing information about database fields.
mysqlNumFields( $res)
Get number of fields in result.
mysqlFetchArray( $res)
Fetch a result row as an associative and numeric array.
makeList( $a, $mode=LIST_COMMA)
Makes an encoded list of strings from an array.
duplicateTableStructure( $oldName, $newName, $temporary=false, $fname=__METHOD__)
close()
Closes a database connection.
query( $sql, $fname=__METHOD__, $tempIgnore=false)
Run an SQL query and return the result.
wfProfileIn( $functionname)
Begin profiling of a function.
wfSuppressWarnings( $end=false)
Reference-counted warning suppression.
mysqlFreeResult( $res)
Free result memory.
mysqlConnect( $realServer)
Open a connection to a MySQL server.
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
getServerVersion()
A string describing the current software version, like from mysql_get_server_info().
wfHostname()
Fetch server name for use in error reporting etc.
estimateRowCount( $table, $vars=' *', $conds='', $fname=__METHOD__, $options=array())
Estimate rows in dataset Returns estimated count, based on EXPLAIN output Takes same arguments as Dat...
mysqlFetchField( $res, $n)
Get column information from a result.
setSessionOptions(array $options)
An object representing a master or slave position in a replicated setup.
isQuotedIdentifier( $name)
wasLockTimeout()
Determines if the last failure was due to a lock timeout.
hasReached(MySQLMasterPos $pos)
doQuery( $sql)
The DBMS-dependent part of query()
tableExists( $table, $fname=__METHOD__)
Query whether a given table exists.
replace( $table, $uniqueIndexes, $rows, $fname=__METHOD__)
getMysqlStatus( $which="%")
Get status information from SHOW STATUS in an associative array.
indexInfo( $table, $index, $fname=__METHOD__)
Get information about an index into an object Returns false if the index does not exist.
mysqlSetCharset( $charset)
Set the character set of the MySQL link.
mysqlPing()
Ping a server connection or reconnect if there is no connection.
We ve cleaned up the code here by removing clumps of infrequently used code and moving them off somewhere else It s much easier for someone working with this code to see what s _really_ going and make changes or fix bugs In we can take all the code that deals with the little used title reversing we can concentrate it all in an extension file
indexName( $index)
Get the name of an index in a given table.
fieldInfo( $table, $field)
addQuotes( $s)
Adds quotes and backslashes.
selectField( $table, $var, $cond='', $fname=__METHOD__, $options=array())
A SELECT wrapper which returns a single field from a single result row.
getSlavePos()
Get the position of the master from SHOW SLAVE STATUS.
connectInitCharset()
Set the character set information right after connection.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
mysqlNumRows( $res)
Get number of rows in result.
select( $table, $vars, $conds='', $fname=__METHOD__, $options=array(), $join_conds=array())
Execute a SELECT query constructed using the various parameters provided.
wfRestoreWarnings()
Restore error level to previous value.
wfProfileOut( $functionname='missing')
Stop profiling of a function.
mysqlFetchObject( $res)
Fetch a result row as an object.
nativeReplace( $table, $rows, $fname)
REPLACE query wrapper for MySQL and SQLite, which have a native REPLACE statement.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
selectDB( $db)
Change the current database.
addIdentifierQuotes( $s)
MySQL uses backticks for identifier quoting instead of the sql standard "double quotes".
processing should stop and the error should be shown to the user * false
unlock( $lockName, $method)
FROM MYSQL DOCS: http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_release...
MysqlMasterPos $lastKnownSlavePos
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
setBigSelects( $value=true)
wfDebug( $text, $dest='all')
Sends a line to the debug log if enabled or, optionally, to a comment in output.
lock( $lockName, $method, $timeout=5)
Allows to change the fields on the form that will be generated $name
deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname=__METHOD__)
DELETE where the condition is a join.
wfLogDBError( $text)
Log for database errors.
getSearchEngine()
Get search engine class.
Database abstraction object.
mysqlDataSeek( $res, $row)
Move internal result pointer.
upsert( $table, array $rows, array $uniqueIndexes, array $set, $fname=__METHOD__)
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 account $user
commit( $fname=__METHOD__, $flush='')
Commits a transaction previously started using begin().
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid return false to implement your own hashing method & $password
wasReadOnlyError()
Determines if the last failure was due to the database being read-only.
lastErrno()
Get the last error number.
wasDeadlock()
Determines if the last failure was due to a deadlock.
mysqlError( $conn=null)
Returns the text of the error message from previous MySQL operation.
setFakeSlaveLag( $lag)
Set lag time in seconds for a fake slave.
getLag()
Returns slave lag.
mysqlFieldName( $res, $n)
Get the name of the specified field in a result.
open( $server, $user, $password, $dbName)
fieldType( $res, $n)
mysql_field_type() wrapper
__construct( $file, $pos)
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
closeConnection()
Closes underlying database connection.
setFakeMaster( $enabled=true)
Make this connection a fake master.
static configuration should be added through ResourceLoaderGetConfigVars instead & $vars
dropTable( $tableName, $fName=__METHOD__)
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead where the first element is the message key and the remaining elements are used as parameters to the message based on mime etc Preferred in most cases over UploadVerification object with all info about the upload string as detected by MediaWiki Handlers will typically only apply for specific mime types object & $error
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone 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 add a value to it if you want to add a cookie that have to vary cache options can modify $query
mysqlFieldType( $res, $n)
Get the type of the specified field in a result.
wasErrorReissuable()
Determines if the last query error was something that should be dealt with by pinging the connection ...
isView( $name, $prefix=null)
Differentiates between a TABLE and a VIEW.
Result wrapper for grabbing data queried by someone else.
getServerUptime()
Determines how long the server has been up.
lockIsFree( $lockName, $method)
Check to see if a named lock is available.
lockTables( $read, $write, $method, $lowPriority=true)