40 if ( is_null( $prefix ) ) {
43 parent::__construct(
$query, $moduleName, $prefix );
49 $prop = array_flip(
$params[
'prop'] );
54 'version' =>
$params[
'metadataversion'],
55 'language' =>
$params[
'extmetadatalanguage'],
56 'multilang' =>
$params[
'extmetadatamultilang'],
57 'extmetadatafilter' =>
$params[
'extmetadatafilter'],
58 'revdelUser' => $this->
getUser(),
61 $pageIds = $this->
getPageSet()->getGoodAndMissingTitlesByNamespace();
62 if ( !empty( $pageIds[
NS_FILE] ) ) {
67 if ( !is_null(
$params[
'continue'] ) ) {
68 $cont = explode(
'|',
$params[
'continue'] );
70 $fromTitle = strval( $cont[0] );
71 $fromTimestamp = $cont[1];
74 if (
$title < $fromTitle ) {
99 $start =
$title === $fromTitle ? $fromTimestamp :
$params[
'start'];
101 if ( !isset( $images[
$title] ) ) {
102 if ( isset( $prop[
'uploadwarning'] ) ) {
107 [
'query',
'pages', intval( $pageId ) ],
108 'imagerepository',
''
118 if ( self::getTransformCount() >= self::TRANSFORM_LIMIT ) {
119 if ( count( $pageIds[
NS_FILE] ) == 1 ) {
132 [
'query',
'pages', intval( $pageId ) ],
133 'imagerepository', $img->getRepoName()
136 if ( count( $pageIds[
NS_FILE] ) == 1 ) {
159 ( is_null( $start ) || $img->getTimestamp() <= $start ) &&
160 ( is_null(
$params[
'end'] ) || $img->getTimestamp() >=
$params[
'end'] )
165 static::getInfo( $img, $prop,
$result,
166 $finalThumbParams, $opts
170 if ( count( $pageIds[
NS_FILE] ) == 1 ) {
184 $count = ( $gotOne ? 1 : 0 );
187 foreach ( $oldies
as $oldie ) {
192 if ( count( $pageIds[
NS_FILE] ) == 1 ) {
200 static::getInfo( $oldie, $prop,
$result,
201 $finalThumbParams, $opts
205 if ( count( $pageIds[
NS_FILE] ) == 1 ) {
228 if (
$params[
'urlwidth'] != -1 ) {
230 $scale[
'width'] =
$params[
'urlwidth'];
231 $scale[
'height'] =
$params[
'urlheight'];
232 } elseif (
$params[
'urlheight'] != -1 ) {
236 $scale[
'height'] =
$params[
'urlheight'];
259 if ( $thumbParams ===
null ) {
263 if ( !isset( $thumbParams[
'width'] ) && isset( $thumbParams[
'height'] ) ) {
268 if (
$image->getWidth() <= 0 ) {
269 $thumbParams[
'width'] = max( $this->
getConfig()->
get(
'ThumbLimits' ) );
271 $thumbParams[
'width'] =
$image->getWidth();
275 if ( !$otherParams ) {
281 $h =
$image->getHandler();
283 $this->
setWarning(
'Could not create thumbnail because ' .
284 $image->getName() .
' does not have an associated image handler' );
289 $paramList = $h->parseParamString( $otherParams );
296 .
'. Using only width and height' );
301 if ( isset( $paramList[
'width'] ) && isset( $thumbParams[
'width'] ) ) {
302 if ( intval( $paramList[
'width'] ) != intval( $thumbParams[
'width'] ) ) {
303 $this->
setWarning(
"Ignoring width value set in {$p}urlparam ({$paramList['width']}) "
304 .
"in favor of width value derived from {$p}urlwidth/{$p}urlheight "
305 .
"({$thumbParams['width']})" );
311 $this->
dieUsage(
"Invalid value for {$p}urlparam ($name=$value)",
'urlparam' );
315 $finalParams = $thumbParams + $paramList;
332 $h =
$image->getHandler();
339 if ( !$h->normaliseParams(
$image, $finalParams ) ) {
340 $this->
dieUsage(
'Could not normalise image parameters for ' .
341 $image->getName(),
'urlparamnormal' );
360 public static function getInfo( $file, $prop,
$result, $thumbParams =
null, $opts =
false ) {
365 if ( !$opts || is_string( $opts ) ) {
367 'version' => $opts ?:
'latest',
369 'multilang' =>
false,
370 'extmetadatafilter' => [],
371 'revdelUser' =>
null,
374 $version = $opts[
'version'];
380 if ( isset( $prop[
'timestamp'] ) ) {
385 if ( isset( $opts[
'revdelUser'] ) && $opts[
'revdelUser'] ) {
386 $revdelUser = $opts[
'revdelUser'];
387 $canShowField =
function ( $field )
use ( $file, $revdelUser ) {
388 return $file->userCan( $field, $revdelUser );
391 $canShowField =
function ( $field )
use ( $file ) {
392 return !$file->isDeleted( $field );
396 $user = isset( $prop[
'user'] );
397 $userid = isset( $prop[
'userid'] );
399 if (
$user || $userid ) {
401 $vals[
'userhidden'] =
true;
406 $vals[
'user'] = $file->getUser();
409 $vals[
'userid'] = $file->getUser(
'id' );
411 if ( !$file->getUser(
'id' ) ) {
412 $vals[
'anon'] =
true;
419 if ( isset( $prop[
'size'] ) || isset( $prop[
'dimensions'] ) ) {
420 $vals[
'size'] = intval( $file->getSize() );
421 $vals[
'width'] = intval( $file->getWidth() );
422 $vals[
'height'] = intval( $file->getHeight() );
424 $pageCount = $file->pageCount();
425 if ( $pageCount !==
false ) {
426 $vals[
'pagecount'] = $pageCount;
430 $length = $file->getLength();
433 $vals[
'duration'] = (float)$length;
437 $pcomment = isset( $prop[
'parsedcomment'] );
438 $comment = isset( $prop[
'comment'] );
442 $vals[
'commenthidden'] =
true;
448 $file->getDescription(
File::RAW ), $file->getTitle() );
451 $vals[
'comment'] = $file->getDescription(
File::RAW );
456 $canonicaltitle = isset( $prop[
'canonicaltitle'] );
457 $url = isset( $prop[
'url'] );
458 $sha1 = isset( $prop[
'sha1'] );
459 $meta = isset( $prop[
'metadata'] );
460 $extmetadata = isset( $prop[
'extmetadata'] );
461 $commonmeta = isset( $prop[
'commonmetadata'] );
462 $mime = isset( $prop[
'mime'] );
463 $mediatype = isset( $prop[
'mediatype'] );
464 $archive = isset( $prop[
'archivename'] );
465 $bitdepth = isset( $prop[
'bitdepth'] );
466 $uploadwarning = isset( $prop[
'uploadwarning'] );
468 if ( $uploadwarning ) {
473 $vals[
'filehidden'] =
true;
478 $vals[
'suppressed'] =
true;
486 if ( $canonicaltitle ) {
487 $vals[
'canonicaltitle'] = $file->getTitle()->getPrefixedText();
491 if ( !is_null( $thumbParams ) ) {
492 $mto = $file->transform( $thumbParams );
493 self::$transformCount++;
494 if ( $mto && !$mto->isError() ) {
499 if ( $mto->getUrl() !== $file->getUrl() ) {
500 $vals[
'thumbwidth'] = intval( $mto->getWidth() );
501 $vals[
'thumbheight'] = intval( $mto->getHeight() );
503 $vals[
'thumbwidth'] = intval( $file->getWidth() );
504 $vals[
'thumbheight'] = intval( $file->getHeight() );
507 if ( isset( $prop[
'thumbmime'] ) && $file->getHandler() ) {
508 list( ,
$mime ) = $file->getHandler()->getThumbType(
509 $mto->getExtension(), $file->getMimeType(), $thumbParams );
510 $vals[
'thumbmime'] =
$mime;
512 } elseif ( $mto && $mto->isError() ) {
513 $vals[
'thumberror'] = $mto->toText();
519 $shortDescriptionUrl = $file->getDescriptionShortUrl();
520 if ( $shortDescriptionUrl !==
null ) {
526 $vals[
'sha1'] = Wikimedia\base_convert( $file->getSha1(), 36, 16, 40 );
530 MediaWiki\suppressWarnings();
532 MediaWiki\restoreWarnings();
533 if ( $metadata && $version !==
'latest' ) {
534 $metadata = $file->convertMetadataVersion( $metadata, $version );
536 $vals[
'metadata'] = $metadata ? static::processMetaData( $metadata,
$result ) :
null;
539 $metaArray = $file->getCommonMetaArray();
540 $vals[
'commonmetadata'] = $metaArray ? static::processMetaData( $metaArray,
$result ) : [];
543 if ( $extmetadata ) {
549 $format->getContext()->setLanguage( $opts[
'language'] );
550 $extmetaArray = $format->fetchExtendedMetadata( $file );
551 if ( $opts[
'extmetadatafilter'] ) {
552 $extmetaArray = array_intersect_key(
553 $extmetaArray, array_flip( $opts[
'extmetadatafilter'] )
556 $vals[
'extmetadata'] = $extmetaArray;
560 $vals[
'mime'] = $file->getMimeType();
564 $vals[
'mediatype'] = $file->getMediaType();
567 if ( $archive && $file->isOld() ) {
568 $vals[
'archivename'] = $file->getArchiveName();
572 $vals[
'bitdepth'] = $file->getBitDepth();
597 if ( is_array( $metadata ) ) {
598 foreach ( $metadata
as $key =>
$value ) {
603 if ( is_array(
$value ) ) {
630 if ( $start ===
null ) {
631 $start = $img->getTimestamp();
634 return $img->getOriginalTitle()->getDBkey() .
'|' . $start;
664 'apihelp-query+imageinfo-param-urlwidth',
672 'metadataversion' => [
676 'extmetadatalanguage' => [
680 'extmetadatamultilang' => [
684 'extmetadatafilter' => [
695 'localonly' =>
false,
706 return array_keys( static::getPropertyMessages( $filter ) );
716 return array_diff_key(
718 'timestamp' =>
'apihelp-query+imageinfo-paramvalue-prop-timestamp',
719 'user' =>
'apihelp-query+imageinfo-paramvalue-prop-user',
720 'userid' =>
'apihelp-query+imageinfo-paramvalue-prop-userid',
721 'comment' =>
'apihelp-query+imageinfo-paramvalue-prop-comment',
722 'parsedcomment' =>
'apihelp-query+imageinfo-paramvalue-prop-parsedcomment',
723 'canonicaltitle' =>
'apihelp-query+imageinfo-paramvalue-prop-canonicaltitle',
724 'url' =>
'apihelp-query+imageinfo-paramvalue-prop-url',
725 'size' =>
'apihelp-query+imageinfo-paramvalue-prop-size',
726 'dimensions' =>
'apihelp-query+imageinfo-paramvalue-prop-dimensions',
727 'sha1' =>
'apihelp-query+imageinfo-paramvalue-prop-sha1',
728 'mime' =>
'apihelp-query+imageinfo-paramvalue-prop-mime',
729 'thumbmime' =>
'apihelp-query+imageinfo-paramvalue-prop-thumbmime',
730 'mediatype' =>
'apihelp-query+imageinfo-paramvalue-prop-mediatype',
731 'metadata' =>
'apihelp-query+imageinfo-paramvalue-prop-metadata',
732 'commonmetadata' =>
'apihelp-query+imageinfo-paramvalue-prop-commonmetadata',
733 'extmetadata' =>
'apihelp-query+imageinfo-paramvalue-prop-extmetadata',
734 'archivename' =>
'apihelp-query+imageinfo-paramvalue-prop-archivename',
735 'bitdepth' =>
'apihelp-query+imageinfo-paramvalue-prop-bitdepth',
736 'uploadwarning' =>
'apihelp-query+imageinfo-paramvalue-prop-uploadwarning',
738 array_flip( $filter )
751 'timestamp' =>
' timestamp - Adds timestamp for the uploaded version',
752 'user' =>
' user - Adds the user who uploaded the image version',
753 'userid' =>
' userid - Add the user ID that uploaded the image version',
754 'comment' =>
' comment - Comment on the version',
755 'parsedcomment' =>
' parsedcomment - Parse the comment on the version',
756 'canonicaltitle' =>
' canonicaltitle - Adds the canonical title of the image file',
757 'url' =>
' url - Gives URL to the image and the description page',
758 'size' =>
' size - Adds the size of the image in bytes, ' .
759 'its height and its width. Page count and duration are added if applicable',
760 'dimensions' =>
' dimensions - Alias for size',
761 'sha1' =>
' sha1 - Adds SHA-1 hash for the image',
762 'mime' =>
' mime - Adds MIME type of the image',
763 'thumbmime' =>
' thumbmime - Adds MIME type of the image thumbnail' .
764 ' (requires url and param ' . $modulePrefix .
'urlwidth)',
765 'mediatype' =>
' mediatype - Adds the media type of the image',
766 'metadata' =>
' metadata - Lists Exif metadata for the version of the image',
767 'commonmetadata' =>
' commonmetadata - Lists file format generic metadata ' .
768 'for the version of the image',
769 'extmetadata' =>
' extmetadata - Lists formatted metadata combined ' .
770 'from multiple sources. Results are HTML formatted.',
771 'archivename' =>
' archivename - Adds the file name of the archive ' .
772 'version for non-latest versions',
773 'bitdepth' =>
' bitdepth - Adds the bit depth of the version',
774 'uploadwarning' =>
' uploadwarning - Used by the Special:Upload page to ' .
775 'get information about an existing file. Not intended for use outside MediaWiki core',
789 [
'What image information to get:' ],
790 array_values( array_diff_key( static::getProperties( $modulePrefix ), array_flip( $filter ) ) )
796 'action=query&titles=File:Albert%20Einstein%20Head.jpg&prop=imageinfo'
797 =>
'apihelp-query+imageinfo-example-simple',
798 'action=query&titles=File:Test.jpg&prop=imageinfo&iilimit=50&' .
799 'iiend=2007-12-31T23:59:59Z&iiprop=timestamp|user|url'
800 =>
'apihelp-query+imageinfo-example-dated',
805 return 'https://www.mediawiki.org/wiki/API:Imageinfo';
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
unserialize( $serialized)
wfLocalFile( $title)
Get an object referring to a locally registered file.
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
getModulePrefix()
Get parameter prefix (usually two letters or an empty string).
const PARAM_MAX2
(integer) Max value allowed for the parameter for users with the apihighlimits right,...
const PARAM_MAX
(integer) Max value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
dieContinueUsageIf( $condition)
Die with the $prefix.
const PARAM_TYPE
(string|string[]) Either an array of allowed value strings, or a string type as described below.
const PARAM_DFLT
(null|boolean|integer|string) Default value of the parameter.
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
const PARAM_HELP_MSG_PER_VALUE
((string|array|Message)[]) When PARAM_TYPE is an array, this is an array mapping those values to $msg...
setWarning( $warning)
Set warning section for this module.
const PARAM_MIN
(integer) Lowest value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
const LIMIT_BIG1
Fast query, standard limit.
getResult()
Get the result object.
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
const LIMIT_BIG2
Fast query, apihighlimits limit.
dieUsage( $description, $errorCode, $httpRespCode=0, $extradata=null)
Throw a UsageException, which will (if uncaught) call the main module's error handler and die with an...
const PARAM_ISMULTI
(boolean) Accept multiple pipe-separated values for this parameter (e.g.
This is a base class for all Query modules.
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
addPageSubItem( $pageId, $item, $elemname=null)
Same as addPageSubItems(), but one element of $data at a time.
getPageSet()
Get the PageSet object to work on.
userCanSeeRevDel()
Check whether the current user has permission to view revision-deleted fields.
A query action to get image information and upload history.
checkParameterNormalise( $image, $finalParams)
Verify that the final image parameters can be normalised.
mergeThumbParams( $image, $thumbParams, $otherParams)
Validate and merge scale parameters with handler thumb parameters, give error if invalid.
__construct(ApiQuery $query, $moduleName, $prefix='ii')
getCacheMode( $params)
Get the cache mode for the data generated by this module.
getScale( $params)
From parameters, construct a 'scale' array.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
getHelpUrls()
Return links to more detailed help pages about the module.
static getProperties( $modulePrefix='')
Returns array key value pairs of properties and their descriptions.
static getPropertyNames( $filter=[])
Returns all possible parameters to iiprop.
static getPropertyDescriptions( $filter=[], $modulePrefix='')
Returns the descriptions for the properties provided by getPropertyNames()
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
getContinueStr( $img, $start=null)
static getInfo( $file, $prop, $result, $thumbParams=null, $opts=false)
Get result information for an image revision.
static getTransformCount()
Get the count of image transformations performed.
static getPropertyMessages( $filter=[])
Returns messages for all possible parameters to iiprop.
static processMetaData( $metadata, $result)
getExamplesMessages()
Returns usage examples for this module.
This is the main query class.
const META_TYPE
Key for the 'type' metadata item.
const META_BC_BOOLS
Key for the 'BC bools' metadata item.
static setIndexedTagName(array &$arr, $tag)
Set the tag name for numeric-keyed values in XML format.
getUser()
Get the User object.
getConfig()
Get the Config object.
static formatComment( $comment, $title=null, $local=false, $wikiId=null)
This function is called by all recent changes variants, by the page history, and by the user contribu...
static singleton()
Get a RepoGroup instance.
static getExistsWarning( $exists)
Formats a result of UploadBase::getExistsWarning as HTML This check is static and can be done pre-upl...
static getExistsWarning( $file)
Helper function that does various existence checks for a file.
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
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the local content language as $wgContLang
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
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
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. Return false to stop further processing of the tag $reader:XMLReader object $logInfo:Array of information 'ImportHandlePageXMLTag':When parsing a XML tag in a page. Return false to stop further processing of the tag $reader:XMLReader object & $pageInfo:Array of information 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. Return false to stop further processing of the tag $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. Return false to stop further processing of the tag $reader:XMLReader object 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. Return false to stop further processing of the tag $reader:XMLReader object $revisionInfo:Array of information 'ImportLogInterwikiLink':Hook to change the interwiki link used in log entries and edit summaries for transwiki imports. & $fullInterwikiPrefix:Interwiki prefix, may contain colons. & $pageTitle:String that contains page title. 'ImportSources':Called when reading from the $wgImportSources configuration variable. Can be used to lazy-load the import sources list. & $importSources:The value of $wgImportSources. Modify as necessary. See the comment in DefaultSettings.php for the detail of how to structure this array. '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 '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 '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 '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. '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 IP::isTrustedProxy() & $ip:IP being check & $result:Change this value to override the result of IP::isTrustedProxy() '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 Sanitizer::validateEmail(), 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. '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) '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 '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. 'LanguageSelector':Hook to change the language selector available on a page. $out:The output page. $cssClassName:CSS class name of the language selector. 'LinkBegin':DEPRECATED! Use HtmlPageLinkRendererBegin instead. 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
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
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable modifiable after all normalizations have been except for the $wgMaxImageArea check $image
namespace and then decline to actually register it file or subcat img or subcat $title
Allows to change the fields on the form that will be generated $name
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
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
linkcache txt The LinkCache class maintains a list of article titles and the information about whether or not the article exists in the database This is used to mark up links when displaying a page If the same link appears more than once on any page then it only has to be looked up once In most cases link lookups are done in batches with the LinkBatch class or the equivalent in so the link cache is mostly useful for short snippets of parsed and for links in the navigation areas of the skin The link cache was formerly used to track links used in a document for the purposes of updating the link tables This application is now deprecated To create a you can use the following $titles
if( $ext=='php'|| $ext=='php5') $mime
const TS_ISO_8601
ISO 8601 format with no timezone: 1986-02-09T20:00:00Z.