40 public function __construct( $name =
'Recentchanges', $restriction =
'' ) {
41 parent::__construct( $name, $restriction );
43 $this->watchlistFilterGroupDefinition = [
44 'name' =>
'watchlist',
45 'title' =>
'rcfilters-filtergroup-watchlist',
46 'class' => ChangesListStringOptionsFilterGroup::class,
48 'isFullCoverage' =>
true,
52 'label' =>
'rcfilters-filter-watchlist-watched-label',
53 'description' =>
'rcfilters-filter-watchlist-watched-description',
54 'cssClassSuffix' =>
'watched',
55 'isRowApplicableCallable' =>
function ( $ctx, $rc ) {
56 return $rc->getAttribute(
'wl_user' );
60 'name' =>
'watchednew',
61 'label' =>
'rcfilters-filter-watchlist-watchednew-label',
62 'description' =>
'rcfilters-filter-watchlist-watchednew-description',
63 'cssClassSuffix' =>
'watchednew',
64 'isRowApplicableCallable' =>
function ( $ctx, $rc ) {
65 return $rc->getAttribute(
'wl_user' ) &&
66 $rc->getAttribute(
'rc_timestamp' ) &&
67 $rc->getAttribute(
'wl_notificationtimestamp' ) &&
68 $rc->getAttribute(
'rc_timestamp' ) >= $rc->getAttribute(
'wl_notificationtimestamp' );
72 'name' =>
'notwatched',
73 'label' =>
'rcfilters-filter-watchlist-notwatched-label',
74 'description' =>
'rcfilters-filter-watchlist-notwatched-description',
75 'cssClassSuffix' =>
'notwatched',
76 'isRowApplicableCallable' =>
function ( $ctx, $rc ) {
77 return $rc->getAttribute(
'wl_user' ) ===
null;
82 'queryCallable' =>
function ( $specialPageClassName,
$context,
$dbr,
83 &
$tables, &$fields, &$conds, &$query_options, &$join_conds, $selectedValues ) {
84 sort( $selectedValues );
85 $notwatchedCond =
'wl_user IS NULL';
86 $watchedCond =
'wl_user IS NOT NULL';
87 $newCond =
'rc_timestamp >= wl_notificationtimestamp';
89 if ( $selectedValues === [
'notwatched' ] ) {
90 $conds[] = $notwatchedCond;
94 if ( $selectedValues === [
'watched' ] ) {
95 $conds[] = $watchedCond;
99 if ( $selectedValues === [
'watchednew' ] ) {
100 $conds[] =
$dbr->makeList( [
107 if ( $selectedValues === [
'notwatched',
'watched' ] ) {
112 if ( $selectedValues === [
'notwatched',
'watchednew' ] ) {
113 $conds[] =
$dbr->makeList( [
123 if ( $selectedValues === [
'watched',
'watchednew' ] ) {
124 $conds[] = $watchedCond;
128 if ( $selectedValues === [
'notwatched',
'watched',
'watchednew' ] ) {
144 $feedFormat = $this->
getRequest()->getVal(
'feed' );
145 if ( !$this->
including() && $feedFormat ) {
147 $query[
'feedformat'] = $feedFormat ===
'atom' ?
'atom' :
'rss';
155 $out->setCdnMaxage( 10 );
158 if ( $lastmod ===
false ) {
163 '//meta.wikimedia.org/wiki/Special:MyLanguage/Help:Recent_changes',
166 parent::execute( $subpage );
169 $out->addJsConfigVars(
'wgStructuredChangeFiltersLiveUpdateSupported',
true );
177 if ( isset( $filterDefinition[
'showHideSuffix'] ) ) {
178 $filterDefinition[
'showHide'] =
'rc' . $filterDefinition[
'showHideSuffix'];
181 return $filterDefinition;
188 parent::registerFilters();
192 $this->
getUser()->isLoggedIn() &&
193 $this->
getUser()->isAllowed(
'viewmywatchlist' )
197 $watchlistGroup->getFilter(
'watched' )->setAsSupersetOf(
198 $watchlistGroup->getFilter(
'watchednew' )
205 $hideMinor = $significance->getFilter(
'hideminor' );
206 $hideMinor->setDefault( $user->getBoolOption(
'hideminor' ) );
209 $hideBots = $automated->getFilter(
'hidebots' );
210 $hideBots->setDefault(
true );
213 if ( $reviewStatus !==
null ) {
215 $hidePatrolled = $reviewStatus->getFilter(
'hidepatrolled' );
216 $hidePatrolled->setDefault( $user->getBoolOption(
'hidepatrolled' ) );
220 $hideCategorization = $changeType->getFilter(
'hidecategorization' );
221 if ( $hideCategorization !==
null ) {
223 $hideCategorization->setDefault( $user->getBoolOption(
'hidecategorization' ) );
233 $opts = parent::getDefaultOptions();
237 $opts->add(
'from',
'' );
239 $opts->add(
'categories',
'' );
240 $opts->add(
'categories_any',
false );
251 if ( $this->customFilters ===
null ) {
252 $this->customFilters = parent::getCustomFilters();
253 Hooks::run(
'SpecialRecentChangesFilters', [ $this, &$this->customFilters ],
'1.23' );
266 parent::parseParameters( $par, $opts );
268 $bits = preg_split(
'/\s*,\s*/', trim( $par ) );
269 foreach ( $bits as $bit ) {
270 if ( is_numeric( $bit ) ) {
271 $opts[
'limit'] = $bit;
275 if ( preg_match(
'/^limit=(\d+)$/', $bit, $m ) ) {
276 $opts[
'limit'] = $m[1];
278 if ( preg_match(
'/^days=(\d+(?:\.\d+)?)$/', $bit, $m ) ) {
279 $opts[
'days'] = $m[1];
281 if ( preg_match(
'/^namespace=(.*)$/', $bit, $m ) ) {
282 $opts[
'namespace'] = $m[1];
284 if ( preg_match(
'/^tagfilter=(.*)$/', $bit, $m ) ) {
285 $opts[
'tagfilter'] = $m[1];
293 parent::validateOptions( $opts );
303 parent::buildQuery(
$tables, $fields, $conds,
304 $query_options, $join_conds, $opts );
307 $cutoff_unixtime = time() - $opts[
'days'] * 3600 * 24;
308 $cutoff =
$dbr->timestamp( $cutoff_unixtime );
310 $fromValid = preg_match(
'/^[0-9]{14}$/', $opts[
'from'] );
311 if ( $fromValid && $opts[
'from'] >
wfTimestamp( TS_MW, $cutoff ) ) {
312 $cutoff =
$dbr->timestamp( $opts[
'from'] );
314 $opts->
reset(
'from' );
317 $conds[] =
'rc_timestamp >= ' .
$dbr->addQuotes( $cutoff );
333 if ( $user->isLoggedIn() && $user->isAllowed(
'viewmywatchlist' ) ) {
335 $fields[] =
'wl_user';
336 $fields[] =
'wl_notificationtimestamp';
337 $join_conds[
'watchlist'] = [
'LEFT JOIN', [
338 'wl_user' => $user->getId(),
340 'wl_namespace=rc_namespace'
346 $fields[] =
'page_latest';
347 $join_conds[
'page'] = [
'LEFT JOIN',
'rc_cur_id=page_id' ];
349 $tagFilter = $opts[
'tagfilter'] ? explode(
'|', $opts[
'tagfilter'] ) : [];
370 'ORDER BY' =>
'rc_timestamp DESC',
371 'LIMIT' => $opts[
'limit']
373 if ( in_array(
'DISTINCT', $query_options ) ) {
379 $orderByAndLimit[
'ORDER BY'] =
'rc_timestamp DESC, rc_id DESC';
380 $orderByAndLimit[
'GROUP BY'] =
'rc_timestamp, rc_id';
386 $query_options = array_merge( $orderByAndLimit, $query_options );
392 $conds + [
'rc_new' => [ 0, 1 ] ],
399 if ( $this->
getConfig()->
get(
'AllowCategorizedRecentChanges' ) ) {
407 &$query_options, &$join_conds, $opts
409 return parent::runMainQueryHook(
$tables, $fields, $conds, $query_options, $join_conds, $opts )
411 'SpecialRecentChangesQuery',
412 [ &$conds, &
$tables, &$join_conds, $opts, &$query_options, &$fields ],
435 $query[
'action'] =
'feedrecentchanges';
436 $feedLimit = $this->
getConfig()->get(
'FeedLimit' );
437 if ( $query[
'limit'] > $feedLimit ) {
438 $query[
'limit'] = $feedLimit;
451 $limit = $opts[
'limit'];
453 $showWatcherCount = $this->
getConfig()->get(
'RCShowWatchingUsers' )
454 && $this->
getUser()->getOption(
'shownumberswatching' );
459 $list->initChangesListRows(
$rows );
461 $userShowHiddenCats = $this->
getUser()->getBoolOption(
'showhiddencats' );
462 $rclistOutput = $list->beginRecentChangesList();
467 foreach (
$rows as $obj ) {
473 # Skip CatWatch entries for hidden cats based on user preference
476 !$userShowHiddenCats &&
477 $rc->getParam(
'hidden-cat' )
482 $rc->counter = $counter++;
483 # Check if the page has been updated since the last visit
484 if ( $this->
getConfig()->
get(
'ShowUpdatedMarker' )
485 && !empty( $obj->wl_notificationtimestamp )
487 $rc->notificationtimestamp = ( $obj->rc_timestamp >= $obj->wl_notificationtimestamp );
489 $rc->notificationtimestamp =
false;
491 # Check the number of users watching the page
492 $rc->numberofWatchingusers = 0;
493 if ( $showWatcherCount && $obj->rc_namespace >= 0 ) {
494 if ( !isset( $watcherCache[$obj->rc_namespace][$obj->rc_title] ) ) {
495 $watcherCache[$obj->rc_namespace][$obj->rc_title] =
496 MediaWikiServices::getInstance()->getWatchedItemStore()->countWatchers(
497 new TitleValue( (
int)$obj->rc_namespace, $obj->rc_title )
500 $rc->numberofWatchingusers = $watcherCache[$obj->rc_namespace][$obj->rc_title];
503 $changeLine = $list->recentChangesLine( $rc, !empty( $obj->wl_user ), $counter );
504 if ( $changeLine !==
false ) {
505 $rclistOutput .= $changeLine;
509 $rclistOutput .= $list->endRecentChangesList();
511 if (
$rows->numRows() === 0 ) {
514 $this->
getOutput()->setStatusCode( 404 );
517 $this->
getOutput()->addHTML( $rclistOutput );
530 $defaults = $opts->getAllValues();
531 $nondefaults = $opts->getChangedValues();
537 $panel[] = $this->
optionsPanel( $defaults, $nondefaults, $numRows );
541 $extraOptsCount = count( $extraOpts );
543 $submit =
' ' . Xml::submitButton( $this->
msg(
'recentchanges-submit' )->
text() );
545 $out = Xml::openElement(
'table', [
'class' =>
'mw-recentchanges-table' ] );
546 foreach ( $extraOpts as $name => $optionRow ) {
547 # Add submit button to the last row only
549 $addSubmit = ( $count === $extraOptsCount ) ? $submit :
'';
551 $out .= Xml::openElement(
'tr', [
'class' => $name .
'Form' ] );
552 if ( is_array( $optionRow ) ) {
555 [
'class' =>
'mw-label mw-' . $name .
'-label' ],
560 [
'class' =>
'mw-input' ],
561 $optionRow[1] . $addSubmit
566 [
'class' =>
'mw-input',
'colspan' => 2 ],
567 $optionRow . $addSubmit
570 $out .= Xml::closeElement(
'tr' );
572 $out .= Xml::closeElement(
'table' );
574 $unconsumed = $opts->getUnconsumedValues();
575 foreach ( $unconsumed as $key =>
$value ) {
580 $out .= Html::hidden(
'title',
$t->getPrefixedText() );
581 $form = Xml::tags(
'form', [
'action' =>
wfScript() ],
$out );
583 $panelString = implode(
"\n", $panel );
585 $rcoptions = Xml::fieldset(
586 $this->
msg(
'recentchanges-legend' )->
text(),
588 [
'class' =>
'rcoptions cloptions' ]
593 $rcfilterContainer = Html::element(
595 [
'class' =>
'rcfilters-container' ]
598 $loadingContainer = Html::rawElement(
600 [
'class' =>
'rcfilters-spinner' ],
603 [
'class' =>
'rcfilters-spinner-bounce' ]
611 [
'class' =>
'rcfilters-head' ],
612 $rcfilterContainer . $rcoptions
617 $this->
getOutput()->addHTML( $loadingContainer );
619 $this->
getOutput()->addHTML( $rcoptions );
633 $message = $this->
msg(
'recentchangestext' )->inContentLanguage();
634 if ( !$message->isDisabled() ) {
640 $this->getPageTitle(),
647 $content = $parserOutput->getText();
649 $this->
getOutput()->addParserOutputMetadata( $parserOutput );
656 $topLinksAttributes = [
'class' =>
'mw-recentchanges-toplinks' ];
659 $contentTitle = Html::rawElement(
'div',
660 [
'class' =>
'mw-recentchanges-toplinks-title' ],
661 $this->
msg(
'rcfilters-other-review-tools' )->parse()
663 $contentWrapper = Html::rawElement(
'div',
664 array_merge( [
'class' =>
'mw-collapsible-content' ], $langAttributes ),
667 $content = $contentTitle . $contentWrapper;
673 $topLinksAttributes = array_merge( $topLinksAttributes, $langAttributes );
677 Html::rawElement(
'div', $topLinksAttributes, $content )
689 $opts->consumeValues( [
690 'namespace',
'invert',
'associated',
'tagfilter',
'categories',
'categories_any'
696 if ( $this->
getConfig()->
get(
'AllowCategorizedRecentChanges' ) ) {
701 $opts[
'tagfilter'],
false, $this->
getContext() );
702 if ( count( $tagFilter ) ) {
703 $extraOpts[
'tagfilter'] = $tagFilter;
707 if ( $this->
getName() ===
'Recentchanges' ) {
708 Hooks::run(
'SpecialRecentChangesPanel', [ &$extraOpts, $opts ] );
718 parent::addModules();
720 $out->addModules(
'mediawiki.special.recentchanges' );
732 $lastmod =
$dbr->selectField(
'recentchanges',
'MAX(rc_timestamp)',
false, __METHOD__ );
744 $nsSelect = Html::namespaceSelector(
745 [
'selected' => $opts[
'namespace'],
'all' =>
'' ],
746 [
'name' =>
'namespace',
'id' =>
'namespace' ]
748 $nsLabel = Xml::label( $this->
msg(
'namespace' )->
text(),
'namespace' );
749 $invert = Xml::checkLabel(
750 $this->
msg(
'invert' )->
text(),
'invert',
'nsinvert',
752 [
'title' => $this->
msg(
'tooltip-invert' )->
text() ]
754 $associated = Xml::checkLabel(
755 $this->
msg(
'namespace_association' )->
text(),
'associated',
'nsassociated',
757 [
'title' => $this->
msg(
'tooltip-namespace_association' )->
text() ]
760 return [ $nsLabel,
"$nsSelect $invert $associated" ];
770 list( $label,
$input ) = Xml::inputLabelSep( $this->
msg(
'rc_categories' )->
text(),
771 'categories',
'mw-categories',
false, $opts[
'categories'] );
773 $input .=
' ' . Xml::checkLabel( $this->
msg(
'rc_categories_any' )->
text(),
774 'categories_any',
'mw-categories_any', $opts[
'categories_any'] );
776 return [ $label,
$input ];
786 $categories = array_map(
'trim', explode(
'|', $opts[
'categories'] ) );
788 if ( !count( $categories ) ) {
794 foreach ( $categories as $cat ) {
806 foreach (
$rows as $k => $r ) {
807 $nt = Title::makeTitle( $r->rc_namespace, $r->rc_title );
808 $id = $nt->getArticleID();
810 continue; #
Page might have been deleted...
812 if ( !in_array( $id, $articles ) ) {
815 if ( !isset( $a2r[$id] ) ) {
823 if ( !count( $articles ) || !count( $cats ) ) {
829 $catFind->
seed( $articles, $cats, $opts[
'categories_any'] ?
'OR' :
'AND' );
830 $match = $catFind->run();
834 foreach ( $match as $id ) {
835 foreach ( $a2r[$id] as
$rev ) {
837 $newrows[$k] = $rowsarr[$k];
856 $title =
new HtmlArmor(
'<strong>' . htmlspecialchars( $title ) .
'</strong>' );
860 'data-params' => json_encode( $override ),
861 'data-keys' => implode(
',', array_keys( $override ) ),
874 $options = $nondefaults + $defaults;
877 $msg = $this->
msg(
'rclegend' );
878 if ( !$msg->isDisabled() ) {
879 $note .=
'<div class="mw-rclegend">' . $msg->parse() .
"</div>\n";
887 [
'from' =>
'' ], $nondefaults );
889 $noteFromMsg = $this->
msg(
'rcnotefrom' )
896 ->numParams( $numRows );
897 $note .= Html::rawElement(
899 [
'class' =>
'rcnotefrom' ],
900 $noteFromMsg->parse()
905 [
'class' =>
'rcoptions-listfromreset' ],
906 $this->
msg(
'parentheses' )->rawParams( $resetLink )->parse()
911 # Sort data for display and make sure it's unique after we've added user data.
912 $linkLimits = $config->get(
'RCLinkLimits' );
915 $linkLimits = array_unique( $linkLimits );
917 $linkDays = $config->get(
'RCLinkDays' );
920 $linkDays = array_unique( $linkDays );
924 foreach ( $linkLimits as
$value ) {
928 $cl =
$lang->pipeList( $cl );
932 foreach ( $linkDays as
$value ) {
936 $dl =
$lang->pipeList( $dl );
938 $showhide = [
'show',
'hide' ];
945 if ( !$group->isPerGroupRequestParameter() ) {
946 foreach ( $group->getFilters() as $key => $filter ) {
947 if ( $filter->displaysOnUnstructuredUi( $this ) ) {
948 $msg = $filter->getShowHide();
949 $linkMessage = $this->
msg( $msg .
'-' . $showhide[1 -
$options[$key]] );
952 if ( !$linkMessage->exists() ) {
953 $linkMessage = $this->
msg( $showhide[1 -
$options[$key]] );
957 [ $key => 1 -
$options[$key] ], $nondefaults );
960 'class' =>
"$msg rcshowhideoption clshowhideoption",
961 'data-filter-name' => $filter->getName(),
964 if ( $filter->isFeatureAvailableOnStructuredUi( $this ) ) {
965 $attribs[
'data-feature-in-structured-ui'] =
true;
968 $links[] = Html::rawElement(
971 $this->
msg( $msg )->rawParams(
$link )->escaped()
980 $now =
$lang->userTimeAndDate( $timestamp, $user );
981 $timenow =
$lang->userTime( $timestamp, $user );
982 $datenow =
$lang->userDate( $timestamp, $user );
983 $pipedLinks =
'<span class="rcshowhide">' .
$lang->pipeList( $links ) .
'</span>';
985 $rclinks =
'<span class="rclinks">' . $this->
msg(
'rclinks' )->rawParams( $cl, $dl,
'' )
986 ->parse() .
'</span>';
989 $this->
msg(
'rclistfrom' )->rawParams( $now, $timenow, $datenow )->parse(),
990 [
'from' => $timestamp ],
994 return "{$note}$rclinks<br />$pipedLinks<br />$rclistfrom";
1006 return $this->
getUser()->getIntOption(
'rclimit' );
1010 return floatval( $this->
getUser()->getOption(
'rcdays' ) );
within a display generated by the Derivative if and wherever such third party notices normally appear The contents of the NOTICE file are for informational purposes only and do not modify the License You may add Your own attribution notices within Derivative Works that You alongside or as an addendum to the NOTICE text from the provided that such additional attribution notices cannot be construed as modifying the License You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for or distribution of Your or for any such Derivative Works as a provided Your and distribution of the Work otherwise complies with the conditions stated in this License Submission of Contributions Unless You explicitly state any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this without any additional terms or conditions Notwithstanding the nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions Trademarks This License does not grant permission to use the trade service or product names of the except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file Disclaimer of Warranty Unless required by applicable law or agreed to in Licensor provides the WITHOUT WARRANTIES OR CONDITIONS OF ANY either express or including
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfAppendQuery( $url, $query)
Append a query string to an existing URL, which may or may not already have query string parameters a...
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
The "CategoryFinder" class takes a list of articles, creates an internal representation of all their ...
seed( $articleIds, $categories, $mode='AND')
Initializes the instance.
Special page which uses a ChangesList to show query results.
registerFiltersFromDefinitions(array $definition)
Register filters from a definition object.
convertParamsForLink( $params)
Convert parameters values from true/false to 1/0 so they are not omitted by wfArrayToCgi() Bug 36524.
getFilterGroup( $groupName)
Gets a specified ChangesListFilterGroup by name.
isStructuredFilterUiEnabled()
Check whether the structured filter UI is enabled.
areFiltersInConflict()
Check if filters are in conflict and guaranteed to return no results.
outputNoResults()
Add the "no results" message to the output.
getFilterGroups()
Gets the currently registered filters groups.
getOptions()
Get the current FormOptions for this request.
setBottomText(FormOptions $opts)
Send the text to be displayed after the options.
makeLegend()
Return the legend displayed within the fieldset.
$filterGroups
Filter groups, and their contained filters This is an associative array (with group name as key) of C...
const NONE
Signifies that no options in the group are selected, meaning the group has no effect.
static newFromContext(IContextSource $context, array $groups=[])
Fetch an appropriate changes list class for the specified context Some users might want to use an enh...
Marks HTML that shouldn't be escaped.
static singleton()
Get the signleton instance of this class.
static selectFields()
Return the list of recentchanges fields that should be selected to create a new recentchanges object.
getName()
Get the name of this Special Page.
getOutput()
Get the OutputPage being used for this instance.
getUser()
Shortcut to get the User executing this instance.
addFeedLinks( $params)
Adds RSS/atom links.
getContext()
Gets the context this SpecialPage is executed in.
msg( $key)
Wrapper around wfMessage that sets the current context.
getConfig()
Shortcut to get main config object.
getRequest()
Get the WebRequest being used for this instance.
getPageTitle( $subpage=false)
Get a self-referential title object.
getLanguage()
Shortcut to get user's language.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
A special page that lists last changes made to the wiki.
filterByCategories(&$rows, FormOptions $opts)
Filter $rows by categories set in $opts.
optionsPanel( $defaults, $nondefaults, $numRows)
Creates the options panel.
isIncludable()
Whether it's allowed to transclude the special page via {{Special:Foo/params}}.
setTopText(FormOptions $opts)
Send the text to be displayed above the options.
getExtraOptions( $opts)
Get options to be displayed in a form.
makeOptionsLink( $title, $override, $options, $active=false)
Makes change an option link which carries all the other options.
getDB()
Return a IDatabase object for reading.
execute( $subpage)
Main execution point.
static $savedQueriesPreferenceName
addModules()
Add page-specific modules.
getFeedQuery()
Get URL query parameters for action=feedrecentchanges API feed of current recent changes view.
checkLastModified()
Get last modified date, for client caching Don't use this if we are using the patrol feature,...
doHeader( $opts, $numRows)
Set the text to be displayed above the changes.
transformFilterDefinition(array $filterDefinition)
@inheritDoc
parseParameters( $par, FormOptions $opts)
Process $par and put options found in $opts.
categoryFilterForm(FormOptions $opts)
Create an input to filter changes by categories.
__construct( $name='Recentchanges', $restriction='')
namespaceFilterForm(FormOptions $opts)
Creates the choose namespace selection.
validateOptions(FormOptions $opts)
Validate a FormOptions object generated by getDefaultOptions() with values already populated.
getDefaultDays()
Get the default value of the number of days to display when loading the result set.
getDefaultOptions()
Get a FormOptions object containing the default options.
runMainQueryHook(&$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts)
outputChangesList( $rows, $opts)
Build and output the actual changes list.
outputFeedLinks()
Output feed links.
registerFilters()
@inheritDoc
getCustomFilters()
Get all custom filters.
$watchlistFilterGroupDefinition
buildQuery(&$tables, &$fields, &$conds, &$query_options, &$join_conds, FormOptions $opts)
@inheritDoc
doMainQuery( $tables, $fields, $conds, $query_options, $join_conds, FormOptions $opts)
@inheritDoc
Represents a page (or page fragment) title within MediaWiki.
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
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
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
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction $rows
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables
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
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
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
usually copyright or history_copyright This message must be in HTML not wikitext & $link
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 & $attribs
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
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
Interface for type hinting (accepts WikiPage, Article, ImagePage, CategoryPage)
if(is_array($mode)) switch( $mode) $input
if(!isset( $args[0])) $lang