35 private static $coreTags = [
'mw-contentmodelchange' ];
60 $tags = explode(
',', $tags );
62 foreach ( $tags
as $tag ) {
66 $description = self::tagDescription( $tag );
67 if ( $description ===
false ) {
72 [
'class' =>
'mw-tag-marker ' .
79 if ( !$displayTags ) {
83 $markers =
$context->msg(
'tag-list-wrapper' )
84 ->numParams( count( $displayTags ) )
85 ->rawParams(
$context->getLanguage()->commaList( $displayTags ) )
87 $markers =
Xml::tags(
'span', [
'class' =>
'mw-tag-markers' ], $markers );
89 return [ $markers, $classes ];
106 if ( !$msg->exists() ) {
108 return htmlspecialchars(
$tag );
110 if ( $msg->isDisabled() ) {
116 return $msg->parse();
133 public static function addTags( $tags, $rc_id = null, $rev_id = null,
136 $result = self::updateTags( $tags, null, $rc_id, $rev_id, $log_id,
$params, $rc );
170 public static function updateTags( $tagsToAdd, $tagsToRemove, &$rc_id = null,
175 $tagsToAdd = array_filter( (
array)$tagsToAdd );
176 $tagsToRemove = array_filter( (
array)$tagsToRemove );
178 if ( !$rc_id && !$rev_id && !$log_id ) {
179 throw new MWException(
'At least one of: RCID, revision ID, and log ID MUST be ' .
180 'specified when adding or removing a tag from a change!' );
191 $rc_id = $dbw->selectField(
192 [
'logging',
'recentchanges' ],
196 'rc_timestamp = log_timestamp',
201 } elseif ( $rev_id ) {
202 $rc_id = $dbw->selectField(
203 [
'revision',
'recentchanges' ],
207 'rc_timestamp = rev_timestamp',
208 'rc_this_oldid = rev_id'
213 } elseif ( !$log_id && !$rev_id ) {
215 $log_id = $dbw->selectField(
218 [
'rc_id' => $rc_id ],
221 $rev_id = $dbw->selectField(
224 [
'rc_id' => $rc_id ],
229 if ( $log_id && !$rev_id ) {
230 $rev_id = $dbw->selectField(
233 [
'ls_field' =>
'associated_rev_id',
'ls_log_id' => $log_id ],
236 } elseif ( !$log_id && $rev_id ) {
237 $log_id = $dbw->selectField(
240 [
'ls_field' =>
'associated_rev_id',
'ls_value' => $rev_id ],
247 if ( !self::updateTagSummaryRow( $tagsToAdd, $tagsToRemove, $rc_id, $rev_id,
248 $log_id, $prevTags ) ) {
251 return [ [], [], $prevTags ];
255 if ( count( $tagsToAdd ) ) {
257 foreach ( $tagsToAdd
as $tag ) {
262 $tagsRows[] = array_filter(
265 'ct_rc_id' => $rc_id,
266 'ct_log_id' => $log_id,
267 'ct_rev_id' => $rev_id,
273 $dbw->insert(
'change_tag', $tagsRows, __METHOD__, [
'IGNORE' ] );
277 if ( count( $tagsToRemove ) ) {
278 foreach ( $tagsToRemove
as $tag ) {
279 $conds = array_filter(
282 'ct_rc_id' => $rc_id,
283 'ct_log_id' => $log_id,
284 'ct_rev_id' => $rev_id
287 $dbw->delete(
'change_tag', $conds, __METHOD__ );
291 self::purgeTagUsageCache();
293 Hooks::run(
'ChangeTagsAfterUpdateTags', [ $tagsToAdd, $tagsToRemove, $prevTags,
296 return [ $tagsToAdd, $tagsToRemove, $prevTags ];
316 $rc_id, $rev_id, $log_id, &$prevTags = [] ) {
320 $tsConds = array_filter( [
321 'ts_rc_id' => $rc_id,
322 'ts_rev_id' => $rev_id,
323 'ts_log_id' => $log_id
327 $tagsToAdd = array_diff( $tagsToAdd, $tagsToRemove );
332 $prevTags = $dbw->selectField(
'tag_summary',
'ts_tags', $tsConds, __METHOD__ );
333 $prevTags = $prevTags ? $prevTags :
'';
334 $prevTags = array_filter( explode(
',', $prevTags ) );
337 $tagsToAdd = array_values( array_diff( $tagsToAdd, $prevTags ) );
338 $newTags = array_unique( array_merge( $prevTags, $tagsToAdd ) );
341 $tagsToRemove = array_values( array_intersect( $tagsToRemove, $newTags ) );
342 $newTags = array_values( array_diff( $newTags, $tagsToRemove ) );
346 if ( $prevTags == $newTags ) {
353 $dbw->delete(
'tag_summary', $tsConds, __METHOD__ );
355 $dbw->replace(
'tag_summary',
356 [
'ts_rev_id',
'ts_rc_id',
'ts_log_id' ],
357 array_filter( array_merge( $tsConds, [
'ts_tags' => implode(
',', $newTags ) ] ) ),
395 if ( !is_null(
$user ) ) {
396 if ( !
$user->isAllowed(
'applychangetags' ) ) {
398 } elseif (
$user->isBlocked() ) {
405 $allowedTags = self::listExplicitlyDefinedTags();
406 $disallowedTags = array_diff( $tags, $allowedTags );
407 if ( $disallowedTags ) {
408 return self::restrictedTagError(
'tags-apply-not-allowed-one',
409 'tags-apply-not-allowed-multi', $disallowedTags );
440 $result = self::canAddTagsAccompanyingChange( $tags, $user );
447 self::addTags( $tags, $rc_id, $rev_id, $log_id,
$params );
466 if ( !is_null(
$user ) ) {
467 if ( !
$user->isAllowed(
'changetags' ) ) {
469 } elseif (
$user->isBlocked() ) {
477 $explicitlyDefinedTags = self::listExplicitlyDefinedTags();
478 $diff = array_diff( $tagsToAdd, $explicitlyDefinedTags );
480 return self::restrictedTagError(
'tags-update-add-not-allowed-one',
481 'tags-update-add-not-allowed-multi', $diff );
485 if ( $tagsToRemove ) {
489 $softwareDefinedTags = self::listSoftwareDefinedTags();
490 $intersect = array_intersect( $tagsToRemove, $softwareDefinedTags );
492 return self::restrictedTagError(
'tags-update-remove-not-allowed-one',
493 'tags-update-remove-not-allowed-multi', $intersect );
529 if ( is_null( $tagsToAdd ) ) {
532 if ( is_null( $tagsToRemove ) ) {
535 if ( !$tagsToAdd && !$tagsToRemove ) {
545 $result = self::canUpdateTags( $tagsToAdd, $tagsToRemove, $user );
557 list( $tagsAdded, $tagsRemoved, $initialTags ) = self::updateTags( $tagsToAdd,
558 $tagsToRemove, $rc_id, $rev_id, $log_id,
$params, null, $user );
559 if ( !$tagsAdded && !$tagsRemoved ) {
570 $logEntry->setPerformer( $user );
571 $logEntry->setComment( $reason );
577 $logEntry->setTarget(
$rev->getTitle() );
579 } elseif ( $log_id ) {
586 if ( !$logEntry->getTarget() ) {
592 '4::revid' => $rev_id,
593 '5::logid' => $log_id,
594 '6:list:tagsAdded' => $tagsAdded,
595 '7:number:tagsAddedCount' => count( $tagsAdded ),
596 '8:list:tagsRemoved' => $tagsRemoved,
597 '9:number:tagsRemovedCount' => count( $tagsRemoved ),
598 'initialTags' => $initialTags,
600 $logEntry->setParameters( $logParams );
601 $logEntry->setRelations( [
'Tag' => array_merge( $tagsAdded, $tagsRemoved ) ] );
604 $logId = $logEntry->insert( $dbw );
606 $logEntry->publish( $logId,
'udp' );
610 'addedTags' => $tagsAdded,
611 'removedTags' => $tagsRemoved,
630 &$join_conds, &
$options, $filter_tag =
false ) {
633 if ( $filter_tag ===
false ) {
634 $filter_tag = $wgRequest->getVal(
'tagfilter' );
638 if ( in_array(
'recentchanges',
$tables ) ) {
639 $join_cond =
'ct_rc_id=rc_id';
640 } elseif ( in_array(
'logging',
$tables ) ) {
641 $join_cond =
'ct_log_id=log_id';
642 } elseif ( in_array(
'revision',
$tables ) ) {
643 $join_cond =
'ct_rev_id=rev_id';
644 } elseif ( in_array(
'archive',
$tables ) ) {
645 $join_cond =
'ct_rev_id=ar_rev_id';
647 throw new MWException(
'Unable to determine appropriate JOIN condition for tagging.' );
651 ',',
'change_tag',
'ct_tag', $join_cond
654 if ( $wgUseTagFilter && $filter_tag ) {
659 $join_conds[
'change_tag'] = [
'INNER JOIN', $join_cond ];
660 $conds[
'ct_tag'] = $filter_tag;
675 if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) ) {
682 [
'for' =>
'tagfilter' ],
688 $data[] =
new OOUI\TextInputWidget( [
690 'name' =>
'tagfilter',
691 'value' => $selected,
692 'classes' =>
'mw-tagfilter-input',
699 [
'class' =>
'mw-tagfilter-input mw-ui-input mw-ui-input-inline',
'id' =>
'tagfilter' ]
717 $dbw->replace(
'valid_tag',
719 [
'vt_tag' =>
$tag ],
723 self::purgeTagCacheAll();
736 $dbw->delete(
'valid_tag', [
'vt_tag' =>
$tag ], __METHOD__ );
739 self::purgeTagCacheAll();
760 $logEntry->setPerformer( $user );
764 $logEntry->setComment( $reason );
767 if ( !is_null( $tagCount ) ) {
768 $params[
'5:number:count'] = $tagCount;
770 $logEntry->setParameters(
$params );
771 $logEntry->setRelations( [
'Tag' =>
$tag ] );
773 $logId = $logEntry->insert( $dbw );
774 $logEntry->publish( $logId );
788 if ( !is_null(
$user ) ) {
789 if ( !
$user->isAllowed(
'managechangetags' ) ) {
791 } elseif (
$user->isBlocked() ) {
799 $definedTags = self::listDefinedTags();
800 if ( in_array(
$tag, $definedTags ) ) {
805 $tagUsage = self::tagUsageStatistics();
806 if ( !isset( $tagUsage[
$tag] ) ) {
829 $ignoreWarnings =
false ) {
839 self::defineTag(
$tag );
842 $logId = self::logTagManagementAction(
'activate',
$tag, $reason, $user );
856 if ( !is_null(
$user ) ) {
857 if ( !
$user->isAllowed(
'managechangetags' ) ) {
859 } elseif (
$user->isBlocked() ) {
865 $explicitlyDefinedTags = self::listExplicitlyDefinedTags();
866 if ( !in_array(
$tag, $explicitlyDefinedTags ) ) {
888 $ignoreWarnings =
false ) {
898 self::undefineTag(
$tag );
901 $logId = self::logTagManagementAction(
'deactivate',
$tag, $reason, $user );
915 if ( !is_null(
$user ) ) {
916 if ( !
$user->isAllowed(
'managechangetags' ) ) {
918 } elseif (
$user->isBlocked() ) {
930 if ( strpos(
$tag,
',' ) !==
false || strpos(
$tag,
'/' ) !==
false ) {
936 if ( is_null(
$title ) ) {
941 $tagUsage = self::tagUsageStatistics();
942 if ( isset( $tagUsage[
$tag] ) || in_array( $tag, self::listDefinedTags() ) ) {
948 Hooks::run(
'ChangeTagCanCreate', [ $tag,
$user, &$canCreateResult ] );
949 return $canCreateResult;
967 $ignoreWarnings =
false ) {
977 self::defineTag(
$tag );
980 $logId = self::logTagManagementAction(
'create',
$tag, $reason, $user );
998 $dbw->startAtomic( __METHOD__ );
1001 self::undefineTag(
$tag );
1004 $result = $dbw->select(
'change_tag',
1005 [
'ct_rc_id',
'ct_log_id',
'ct_rev_id',
'ct_tag' ],
1006 [
'ct_tag' =>
$tag ],
1011 $tagsToRemove = [
$tag ];
1012 self::updateTagSummaryRow( $tagsToAdd, $tagsToRemove, $row->ct_rc_id,
1013 $row->ct_rev_id, $row->ct_log_id );
1017 $dbw->delete(
'change_tag', [
'ct_tag' =>
$tag ], __METHOD__ );
1019 $dbw->endAtomic( __METHOD__ );
1026 wfDebug(
'ChangeTagAfterDelete error condition downgraded to warning' );
1031 self::purgeTagCacheAll();
1046 $tagUsage = self::tagUsageStatistics();
1048 if ( !is_null(
$user ) ) {
1049 if ( !
$user->isAllowed(
'deletechangetags' ) ) {
1051 } elseif (
$user->isBlocked() ) {
1056 if ( !isset( $tagUsage[
$tag] ) && !in_array( $tag, self::listDefinedTags() ) ) {
1060 if ( isset( $tagUsage[$tag] ) && $tagUsage[$tag] > self::MAX_DELETE_USES ) {
1061 return Status::newFatal(
'tags-delete-too-many-uses', $tag, self::MAX_DELETE_USES );
1064 $softwareDefined = self::listSoftwareDefinedTags();
1065 if ( in_array( $tag, $softwareDefined ) ) {
1094 $ignoreWarnings =
false ) {
1104 $tagUsage = self::tagUsageStatistics();
1105 $hitcount = isset( $tagUsage[
$tag] ) ? $tagUsage[
$tag] : 0;
1108 $deleteResult = self::deleteTagEverywhere( $tag );
1109 if ( !$deleteResult->isOK() ) {
1110 return $deleteResult;
1114 $logId = self::logTagManagementAction(
'delete', $tag, $reason, $user, $hitcount );
1115 $deleteResult->value = $logId;
1116 return $deleteResult;
1127 $tags = self::$coreTags;
1134 function ( $oldValue, &$ttl,
array &$setOpts )
use ( $tags ) {
1138 Hooks::run(
'ChangeTagsListActive', [ &$tags ] );
1142 'checkKeys' => [
wfMemcKey(
'active-tags' ) ],
1156 return self::listSoftwareActivatedTags();
1167 $tags1 = self::listExplicitlyDefinedTags();
1168 $tags2 = self::listSoftwareDefinedTags();
1169 return array_values( array_unique( array_merge( $tags1, $tags2 ) ) );
1193 $tags =
$dbr->selectFieldValues(
'valid_tag',
'vt_tag', [],
$fname );
1195 return array_filter( array_unique( $tags ) );
1198 'checkKeys' => [
wfMemcKey(
'valid-tags-db' ) ],
1216 $tags = self::$coreTags;
1223 function ( $oldValue, &$ttl,
array &$setOpts )
use ( $tags ) {
1227 return array_filter( array_unique( $tags ) );
1230 'checkKeys' => [
wfMemcKey(
'valid-tags-hook' ) ],
1245 return self::listSoftwareDefinedTags();
1260 self::purgeTagUsageCache();
1295 [
'ct_tag',
'hitcount' =>
'count(*)' ],
1298 [
'GROUP BY' =>
'ct_tag',
'ORDER BY' =>
'hitcount DESC' ]
1302 foreach (
$res as $row ) {
1303 $out[$row->ct_tag] = $row->hitcount;
1309 'checkKeys' => [
wfMemcKey(
'change-tag-statistics' ) ],
1331 return $user->
isAllowed(
'changetags' ) && (bool)self::listExplicitlyDefinedTags();
Utility class for creating new RC entries.
static getMainWANInstance()
Get the main WAN cache object.
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
Interface for objects which can provide a MediaWiki context on request.
wfGetDB($db, $groups=[], $wiki=false)
Get a Database object.
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
the array() calling protocol came about after MediaWiki 1.4rc1.
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
static getTitleFor($name, $subpage=false, $fragment= '')
Get a localised Title object for a specified special page name If you don't need a full Title object...
if(!$wgDBerrorLogTZ) $wgRequest
static newFatal($message)
Factory function for fatal errors.
static getCacheSetOptions(IDatabase $db1)
Merge the result of getSessionLagStatus() for several DBs using the most pessimistic values to estima...
pingLimiter($action= 'edit', $incrBy=1)
Primitive rate limits: enforce maximum actions per time period to put a brake on flooding.
static rawElement($element, $attribs=[], $contents= '')
Returns an HTML element in a string.
if(!isset($args[0])) $lang
static isRegistered($name)
Returns true if a hook has a function registered to it.
static input($name, $size=false, $value=false, $attribs=[])
Convenience function to build an HTML text input field.
static escapeClass($class)
Given a value, escape it so that it can be used as a CSS class and return it.
static newFromText($text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
when a variable name is used in a it is silently declared as a new local masking the global
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist & $tables
wfDebug($text, $dest= 'all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
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
static getMain()
Static methods.
isAllowed($action= '')
Internal mechanics of testing a permission.
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a 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 unsetoffset-wrap String Wrap the message in html(usually something like"<
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
wfDeprecated($function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
static makeTitleSafe($ns, $title, $fragment= '', $interwiki= '')
Create a new Title from a namespace index and a DB key.
namespace and then decline to actually register it file or subcat img or subcat $title
static newGood($value=null)
Factory function for good results.
static run($event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
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
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
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
static newFromId($id, $flags=0)
Load a page revision from a given revision ID number.
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
static tags($element, $attribs=null, $contents)
Same as Xml::element(), but does not escape contents.
Class for creating log entries manually, to inject them into the database.
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined...
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
wfMemcKey()
Make a cache key for the local wiki.
static suggestTarget($target, array $ids)
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