55 $tags = explode(
',', $tags );
57 foreach ( $tags
as $tag ) {
62 if ( $description ===
false ) {
67 [
'class' =>
'mw-tag-marker ' .
74 if ( !$displayTags ) {
78 $markers =
$context->msg(
'tag-list-wrapper' )
79 ->numParams( count( $displayTags ) )
80 ->rawParams(
$context->getLanguage()->commaList( $displayTags ) )
82 $markers =
Xml::tags(
'span', [
'class' =>
'mw-tag-markers' ], $markers );
84 return [ $markers, $classes ];
101 if ( !$msg->exists() ) {
103 return htmlspecialchars(
$tag );
105 if ( $msg->isDisabled() ) {
111 return $msg->parse();
126 public static function addTags( $tags, $rc_id =
null, $rev_id =
null,
161 $tagsToAdd, $tagsToRemove,
162 &$rc_id =
null, &$rev_id =
null, &$log_id =
null,
$params =
null
165 $tagsToAdd = array_filter( (
array)$tagsToAdd );
166 $tagsToRemove = array_filter( (
array)$tagsToRemove );
168 if ( !$rc_id && !$rev_id && !$log_id ) {
169 throw new MWException(
'At least one of: RCID, revision ID, and log ID MUST be ' .
170 'specified when adding or removing a tag from a change!' );
181 $rc_id = $dbw->selectField(
182 [
'logging',
'recentchanges' ],
186 'rc_timestamp = log_timestamp',
191 } elseif ( $rev_id ) {
192 $rc_id = $dbw->selectField(
193 [
'revision',
'recentchanges' ],
197 'rc_timestamp = rev_timestamp',
198 'rc_this_oldid = rev_id'
203 } elseif ( !$log_id && !$rev_id ) {
205 $log_id = $dbw->selectField(
208 [
'rc_id' => $rc_id ],
211 $rev_id = $dbw->selectField(
214 [
'rc_id' => $rc_id ],
219 if ( $log_id && !$rev_id ) {
220 $rev_id = $dbw->selectField(
223 [
'ls_field' =>
'associated_rev_id',
'ls_log_id' => $log_id ],
226 } elseif ( !$log_id && $rev_id ) {
227 $log_id = $dbw->selectField(
230 [
'ls_field' =>
'associated_rev_id',
'ls_value' => $rev_id ],
237 if ( !self::updateTagSummaryRow( $tagsToAdd, $tagsToRemove, $rc_id, $rev_id,
238 $log_id, $prevTags ) ) {
241 return [ [], [], $prevTags ];
245 if ( count( $tagsToAdd ) ) {
247 foreach ( $tagsToAdd
as $tag ) {
252 $tagsRows[] = array_filter(
255 'ct_rc_id' => $rc_id,
256 'ct_log_id' => $log_id,
257 'ct_rev_id' => $rev_id,
263 $dbw->insert(
'change_tag', $tagsRows, __METHOD__, [
'IGNORE' ] );
267 if ( count( $tagsToRemove ) ) {
268 foreach ( $tagsToRemove
as $tag ) {
269 $conds = array_filter(
272 'ct_rc_id' => $rc_id,
273 'ct_log_id' => $log_id,
274 'ct_rev_id' => $rev_id
277 $dbw->delete(
'change_tag', $conds, __METHOD__ );
282 return [ $tagsToAdd, $tagsToRemove, $prevTags ];
302 $rc_id, $rev_id, $log_id, &$prevTags = [] ) {
306 $tsConds = array_filter( [
307 'ts_rc_id' => $rc_id,
308 'ts_rev_id' => $rev_id,
309 'ts_log_id' => $log_id
313 $tagsToAdd = array_diff( $tagsToAdd, $tagsToRemove );
318 $prevTags = $dbw->selectField(
'tag_summary',
'ts_tags', $tsConds, __METHOD__ );
319 $prevTags = $prevTags ? $prevTags :
'';
320 $prevTags = array_filter( explode(
',', $prevTags ) );
323 $tagsToAdd = array_values( array_diff( $tagsToAdd, $prevTags ) );
324 $newTags = array_unique( array_merge( $prevTags, $tagsToAdd ) );
327 $tagsToRemove = array_values( array_intersect( $tagsToRemove, $newTags ) );
328 $newTags = array_values( array_diff( $newTags, $tagsToRemove ) );
332 if ( $prevTags == $newTags ) {
339 $dbw->delete(
'tag_summary', $tsConds, __METHOD__ );
341 $dbw->replace(
'tag_summary',
342 [
'ts_rev_id',
'ts_rc_id',
'ts_log_id' ],
343 array_filter( array_merge( $tsConds, [
'ts_tags' => implode(
',', $newTags ) ] ) ),
364 return Status::newFatal( (
$count > 1 ) ? $msgMulti : $msgOne,
379 User $user =
null ) {
381 if ( !is_null(
$user ) ) {
382 if ( !
$user->isAllowed(
'applychangetags' ) ) {
383 return Status::newFatal(
'tags-apply-no-permission' );
384 } elseif (
$user->isBlocked() ) {
385 return Status::newFatal(
'tags-apply-blocked' );
392 $disallowedTags = array_diff( $tags, $allowedTags );
393 if ( $disallowedTags ) {
395 'tags-apply-not-allowed-multi', $disallowedTags );
398 return Status::newGood();
435 return Status::newGood(
true );
450 User $user =
null ) {
452 if ( !is_null(
$user ) ) {
453 if ( !
$user->isAllowed(
'changetags' ) ) {
454 return Status::newFatal(
'tags-update-no-permission' );
455 } elseif (
$user->isBlocked() ) {
456 return Status::newFatal(
'tags-update-blocked' );
464 $diff = array_diff( $tagsToAdd, $explicitlyDefinedTags );
467 'tags-update-add-not-allowed-multi', $diff );
471 if ( $tagsToRemove ) {
476 $intersect = array_intersect( $tagsToRemove, $extensionDefinedTags );
479 'tags-update-remove-not-allowed-multi', $intersect );
483 return Status::newGood();
513 $rc_id, $rev_id, $log_id,
$params, $reason,
User $user ) {
515 if ( is_null( $tagsToAdd ) ) {
518 if ( is_null( $tagsToRemove ) ) {
521 if ( !$tagsToAdd && !$tagsToRemove ) {
523 return Status::newGood( (
object)[
538 if (
$user->pingLimiter(
'changetag' ) ) {
539 return Status::newFatal(
'actionthrottledtext' );
544 $tagsToRemove, $rc_id, $rev_id, $log_id,
$params );
545 if ( !$tagsAdded && !$tagsRemoved ) {
547 return Status::newGood( (
object)[
556 $logEntry->setPerformer(
$user );
557 $logEntry->setComment( $reason );
563 $logEntry->setTarget(
$rev->getTitle() );
565 } elseif ( $log_id ) {
572 if ( !$logEntry->getTarget() ) {
578 '4::revid' => $rev_id,
579 '5::logid' => $log_id,
580 '6:list:tagsAdded' => $tagsAdded,
581 '7:number:tagsAddedCount' => count( $tagsAdded ),
582 '8:list:tagsRemoved' => $tagsRemoved,
583 '9:number:tagsRemovedCount' => count( $tagsRemoved ),
584 'initialTags' => $initialTags,
586 $logEntry->setParameters( $logParams );
587 $logEntry->setRelations( [
'Tag' => array_merge( $tagsAdded, $tagsRemoved ) ] );
590 $logId = $logEntry->insert( $dbw );
592 $logEntry->publish( $logId,
'udp' );
594 return Status::newGood( (
object)[
596 'addedTags' => $tagsAdded,
597 'removedTags' => $tagsRemoved,
616 &$join_conds, &
$options, $filter_tag =
false ) {
619 if ( $filter_tag ===
false ) {
620 $filter_tag =
$wgRequest->getVal(
'tagfilter' );
624 if ( in_array(
'recentchanges',
$tables ) ) {
625 $join_cond =
'ct_rc_id=rc_id';
626 } elseif ( in_array(
'logging',
$tables ) ) {
627 $join_cond =
'ct_log_id=log_id';
628 } elseif ( in_array(
'revision',
$tables ) ) {
629 $join_cond =
'ct_rev_id=rev_id';
630 } elseif ( in_array(
'archive',
$tables ) ) {
631 $join_cond =
'ct_rev_id=ar_rev_id';
633 throw new MWException(
'Unable to determine appropriate JOIN condition for tagging.' );
637 ',',
'change_tag',
'ct_tag', $join_cond
645 $join_conds[
'change_tag'] = [
'INNER JOIN', $join_cond ];
646 $conds[
'ct_tag'] = $filter_tag;
663 $fullForm =
false,
Title $title =
null, $ooui =
false
668 return $fullForm ?
'' : [];
674 [
'for' =>
'tagfilter' ],
680 $data[] =
new OOUI\TextInputWidget( [
682 'name' =>
'tagfilter',
683 'value' => $selected,
684 'classes' =>
'mw-tagfilter-input',
691 [
'class' =>
'mw-tagfilter-input mw-ui-input mw-ui-input-inline',
'id' =>
'tagfilter' ]
699 $html = implode(
' ', $data );
703 [
'type' =>
'submit',
'value' =>
wfMessage(
'tag-filter-submit' )->
text() ]
708 [
'action' =>
$title->getLocalURL(),
'class' =>
'mw-tagfilter-form',
'method' =>
'get' ],
726 $dbw->replace(
'valid_tag',
728 [
'vt_tag' =>
$tag ],
745 $dbw->delete(
'valid_tag', [
'vt_tag' =>
$tag ], __METHOD__ );
764 User $user, $tagCount =
null ) {
769 $logEntry->setPerformer(
$user );
773 $logEntry->setComment( $reason );
776 if ( !is_null( $tagCount ) ) {
777 $params[
'5:number:count'] = $tagCount;
779 $logEntry->setParameters(
$params );
780 $logEntry->setRelations( [
'Tag' =>
$tag ] );
782 $logId = $logEntry->insert( $dbw );
783 $logEntry->publish( $logId );
797 if ( !is_null(
$user ) ) {
798 if ( !
$user->isAllowed(
'managechangetags' ) ) {
799 return Status::newFatal(
'tags-manage-no-permission' );
800 } elseif (
$user->isBlocked() ) {
801 return Status::newFatal(
'tags-manage-blocked' );
809 if ( in_array(
$tag, $definedTags ) ) {
810 return Status::newFatal(
'tags-activate-not-allowed',
$tag );
815 if ( !isset( $tagUsage[
$tag] ) ) {
816 return Status::newFatal(
'tags-activate-not-found',
$tag );
819 return Status::newGood();
838 $ignoreWarnings =
false ) {
852 return Status::newGood( $logId );
865 if ( !is_null(
$user ) ) {
866 if ( !
$user->isAllowed(
'managechangetags' ) ) {
867 return Status::newFatal(
'tags-manage-no-permission' );
868 } elseif (
$user->isBlocked() ) {
869 return Status::newFatal(
'tags-manage-blocked' );
875 if ( !in_array(
$tag, $explicitlyDefinedTags ) ) {
876 return Status::newFatal(
'tags-deactivate-not-allowed',
$tag );
878 return Status::newGood();
897 $ignoreWarnings =
false ) {
911 return Status::newGood( $logId );
924 if ( !is_null(
$user ) ) {
925 if ( !
$user->isAllowed(
'managechangetags' ) ) {
926 return Status::newFatal(
'tags-manage-no-permission' );
927 } elseif (
$user->isBlocked() ) {
928 return Status::newFatal(
'tags-manage-blocked' );
934 return Status::newFatal(
'tags-create-no-name' );
939 if ( strpos(
$tag,
',' ) !==
false || strpos(
$tag,
'/' ) !==
false ) {
940 return Status::newFatal(
'tags-create-invalid-chars' );
945 if ( is_null(
$title ) ) {
946 return Status::newFatal(
'tags-create-invalid-title-chars' );
951 if ( isset( $tagUsage[
$tag] ) || in_array(
$tag, self::listDefinedTags() ) ) {
952 return Status::newFatal(
'tags-create-already-exists',
$tag );
956 $canCreateResult = Status::newGood();
957 Hooks::run(
'ChangeTagCanCreate', [
$tag,
$user, &$canCreateResult ] );
958 return $canCreateResult;
976 $ignoreWarnings =
false ) {
990 return Status::newGood( $logId );
1007 $dbw->startAtomic( __METHOD__ );
1013 $result = $dbw->select(
'change_tag',
1014 [
'ct_rc_id',
'ct_log_id',
'ct_rev_id',
'ct_tag' ],
1015 [
'ct_tag' =>
$tag ],
1020 $tagsToRemove = [
$tag ];
1022 $row->ct_rev_id, $row->ct_log_id );
1026 $dbw->delete(
'change_tag', [
'ct_tag' =>
$tag ], __METHOD__ );
1028 $dbw->endAtomic( __METHOD__ );
1032 Hooks::run(
'ChangeTagAfterDelete', [
$tag, &
$status ] );
1035 wfDebug(
'ChangeTagAfterDelete error condition downgraded to warning' );
1057 if ( !is_null(
$user ) ) {
1058 if ( !
$user->isAllowed(
'managechangetags' ) ) {
1059 return Status::newFatal(
'tags-manage-no-permission' );
1060 } elseif (
$user->isBlocked() ) {
1061 return Status::newFatal(
'tags-manage-blocked' );
1065 if ( !isset( $tagUsage[
$tag] ) && !in_array(
$tag, self::listDefinedTags() ) ) {
1066 return Status::newFatal(
'tags-delete-not-found',
$tag );
1069 if ( isset( $tagUsage[
$tag] ) && $tagUsage[
$tag] > self::MAX_DELETE_USES ) {
1070 return Status::newFatal(
'tags-delete-too-many-uses',
$tag, self::MAX_DELETE_USES );
1074 if ( in_array(
$tag, $extensionDefined ) ) {
1077 $status = Status::newFatal(
'tags-delete-not-allowed' );
1103 $ignoreWarnings =
false ) {
1114 $hitcount = isset( $tagUsage[
$tag] ) ? $tagUsage[
$tag] : 0;
1118 if ( !$deleteResult->isOK() ) {
1119 return $deleteResult;
1124 $deleteResult->value = $logId;
1125 return $deleteResult;
1138 function ( $oldValue, &$ttl,
array &$setOpts ) {
1142 $extensionActive = [];
1143 Hooks::run(
'ChangeTagsListActive', [ &$extensionActive ] );
1144 return $extensionActive;
1147 'checkKeys' => [
wfMemcKey(
'active-tags' ) ],
1164 return array_values( array_unique( array_merge( $tags1, $tags2 ) ) );
1188 $tags =
$dbr->selectFieldValues(
'valid_tag',
'vt_tag', [],
$fname );
1190 return array_filter( array_unique( $tags ) );
1193 'checkKeys' => [
wfMemcKey(
'valid-tags-db' ) ],
1213 function ( $oldValue, &$ttl,
array &$setOpts ) {
1217 Hooks::run(
'ListDefinedTags', [ &$tags ] );
1218 return array_filter( array_unique( $tags ) );
1221 'checkKeys' => [
wfMemcKey(
'valid-tags-hook' ) ],
1275 [
'ct_tag',
'hitcount' =>
'count(*)' ],
1278 [
'GROUP BY' =>
'ct_tag',
'ORDER BY' =>
'hitcount DESC' ]
1282 foreach (
$res as $row ) {
1283 $out[$row->ct_tag] = $row->hitcount;
1289 'checkKeys' => [
wfMemcKey(
'change-tag-statistics' ) ],
1311 return $user->isAllowed(
'changetags' ) && (bool)self::listExplicitlyDefinedTags();
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
$wgUseTagFilter
Allow filtering by change tag in recentchanges, history, etc Has no effect if no tags are defined in ...
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfMemcKey()
Make a cache key for the local wiki.
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
if(is_null($wgLocalTZoffset)) if(! $wgDBerrorLogTZ) $wgRequest
static getCacheSetOptions(IDatabase $db1)
Merge the result of getSessionLagStatus() for several DBs using the most pessimistic values to estima...
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
static hidden( $name, $value, array $attribs=[])
Convenience function to produce an input element with type=hidden.
Class for creating log entries manually, to inject them into the database.
static getMainWANInstance()
Get the main WAN cache object.
static getMain()
Static methods.
static suggestTarget( $target, array $ids)
Suggest a target for the revision deletion Optionally override this function.
static newFromId( $id, $flags=0)
Load a page revision from a given revision ID number.
static escapeClass( $class)
Given a value, escape it so that it can be used as a CSS class and return it.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
Represents a title within MediaWiki.
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
static input( $name, $size=false, $value=false, $attribs=[])
Convenience function to build an HTML text input field.
static tags( $element, $attribs=null, $contents)
Same as Xml::element(), but does not escape contents.
static element( $element, $attribs=null, $contents='', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
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
when a variable name is used in a it is silently declared as a new local masking the global
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
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
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set $status
the array() calling protocol came about after MediaWiki 1.4rc1.
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
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values before the output is cached $page
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist & $tables
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':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
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 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 set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content as context as context $options
namespace and then decline to actually register it file or subcat img or subcat $title
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 $out
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books $tag
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 & $html
presenting them properly to the user as errors is done by the caller return true use this to change the list i e etc $rev
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
Interface for objects which can provide a MediaWiki context on request.
if(!isset( $args[0])) $lang