Go to the documentation of this file.
34 parent::__construct(
'Recentchangeslinked' );
38 $opts = parent::getDefaultOptions();
39 $opts->add(
'target',
'' );
40 $opts->add(
'showlinkedto',
false );
46 $opts[
'target'] = $par;
50 $target = $opts[
'target'];
51 $showlinkedto = $opts[
'showlinkedto'];
54 if ( $target ===
'' ) {
60 $outputPage->addHtml(
'<div class="errorbox">' . $this->
msg(
'allpagesbadtitle' )
61 ->parse() .
'</div>' );
66 $outputPage->setPageTitle( $this->
msg(
'recentchangeslinked-title',
$title->getPrefixedText() ) );
78 $id =
$title->getArticleID();
79 $ns =
$title->getNamespace();
80 $dbkey =
$title->getDBkey();
84 $join_conds =
array();
85 $query_options =
array();
88 $uid = $this->
getUser()->getId();
89 if ( $uid && $this->
getUser()->isAllowed(
'viewmywatchlist' ) ) {
91 $select[] =
'wl_user';
92 $join_conds[
'watchlist'] =
array(
'LEFT JOIN',
array(
95 'wl_namespace=rc_namespace'
98 if ( $this->
getUser()->isAllowed(
'rollback' ) ) {
100 $join_conds[
'page'] =
array(
'LEFT JOIN',
'rc_cur_id=page_id' );
101 $select[] =
'page_latest';
112 if ( !
wfRunHooks(
'SpecialRecentChangesQuery',
113 array( &$conds, &
$tables, &$join_conds, $opts, &$query_options, &$select ),
122 $link_tables =
array(
'categorylinks' );
123 $showlinkedto =
true;
126 $link_tables =
array(
'pagelinks',
'templatelinks' );
128 if ( $ns ==
NS_FILE || !$showlinkedto ) {
129 $link_tables[] =
'imagelinks';
133 if ( $id == 0 && !$showlinkedto ) {
140 'templatelinks' =>
'tl',
141 'categorylinks' =>
'cl',
147 foreach ( $link_tables
as $link_table ) {
148 $pfx = $prefix[$link_table];
152 if ( $link_table ==
'imagelinks' ) {
154 } elseif ( $link_table ==
'categorylinks' ) {
160 if ( $showlinkedto ) {
163 if ( $ns != $link_ns ) {
166 $subconds =
array(
"{$pfx}_to" => $dbkey );
168 $subconds =
array(
"{$pfx}_namespace" => $ns,
"{$pfx}_title" => $dbkey );
170 $subjoin =
"rc_cur_id = {$pfx}_from";
173 $subconds =
array(
"{$pfx}_from" => $id );
174 if ( $link_table ==
'imagelinks' || $link_table ==
'categorylinks' ) {
175 $subconds[
"rc_namespace"] = $link_ns;
176 $subjoin =
"rc_title = {$pfx}_to";
178 $subjoin =
array(
"rc_namespace = {$pfx}_namespace",
"rc_title = {$pfx}_title" );
182 if (
$dbr->unionSupportsOrderAndLimit() ) {
183 $order =
array(
'ORDER BY' =>
'rc_timestamp DESC' );
193 $order + $query_options,
194 $join_conds +
array( $link_table =>
array(
'INNER JOIN', $subjoin ) )
197 if (
$dbr->unionSupportsOrderAndLimit() ) {
204 if ( count( $subsql ) == 0 ) {
207 if ( count( $subsql ) == 1 &&
$dbr->unionSupportsOrderAndLimit() ) {
211 $sql =
$dbr->unionQueries( $subsql,
false ) .
' ORDER BY rc_timestamp DESC';
212 $sql =
$dbr->limitResult( $sql,
$limit,
false );
215 $res =
$dbr->query( $sql, __METHOD__ );
217 if (
$res->numRows() == 0 ) {
218 $this->mResultEmpty =
true;
227 $this->
getOutput()->addBacklinkSubtitle( $target );
238 $extraOpts = parent::getExtraOptions( $opts );
240 $opts->consumeValues(
array(
'showlinkedto',
'target' ) );
242 $extraOpts[
'target'] =
array( $this->
msg(
'recentchangeslinked-page' )->escaped(),
243 Xml::input(
'target', 40, str_replace(
'_',
' ', $opts[
'target'] ) ) .
244 Xml::check(
'showlinkedto', $opts[
'showlinkedto'],
array(
'id' =>
'showlinkedto' ) ) .
' ' .
254 if ( $this->rclTargetTitle ===
null ) {
256 if ( isset( $opts[
'target'] ) && $opts[
'target'] !==
'' ) {
259 $this->rclTargetTitle =
false;
getExtraOptions( $opts)
Get options to be displayed in a form.
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
parseParameters( $par, FormOptions $opts)
Process $par and put options found in $opts.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
namespace and then decline to actually register it RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist & $tables
getOutput()
Get the OutputPage being used for this instance.
This is to display changes made to all articles linked in an article.
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
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
setTopText(FormOptions $opts)
Send the text to be displayed above the options.
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
getUser()
Shortcut to get the User executing this instance.
presenting them properly to the user as errors is done by the caller $title
msg()
Wrapper around wfMessage that sets the current context.
static check( $name, $checked=false, $attribs=array())
Convenience function to build an HTML checkbox.
static newFromURL( $url)
THIS IS NOT THE FUNCTION YOU WANT.
A special page that lists last changes made to the wiki.
Represents a title within MediaWiki.
getDefaultOptions()
Get a FormOptions object containing the default options.
static selectFields()
Return the list of recentchanges fields that should be selected to create a new recentchanges object.
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
doMainQuery( $conds, $opts)
Process the query.
static input( $name, $size=false, $value=false, $attribs=array())
Convenience function to build an HTML text input field.
static label( $label, $id, $attribs=array())
Convenience function to build an HTML form label.
bool Title $rclTargetTitle
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query
getOptions()
Get the current FormOptions for this request.