$opts->add( 'categories', '' );
$opts->add( 'categories_any', false );
$opts->add( 'tagfilter', '' );
+
return $opts;
}
}
$opts->validateIntBounds( 'limit', 0, 5000 );
+
return $opts;
}
$this->customFilters = array();
wfRunHooks( 'SpecialRecentChangesFilters', array( $this, &$this->customFilters ) );
}
+
return $this->customFilters;
}
$opts = $this->getDefaultOptions();
$opts->fetchValuesFromRequest( $this->getRequest() );
$opts->validateIntBounds( 'limit', 0, $wgFeedLimit );
+
return $opts;
}
}
$this->rcOptions = $isFeed ? $this->feedSetup() : $this->setup( $this->rcSubpage );
}
+
return $this->rcOptions;
}
if ( !$this->including() ) {
$this->doHeader( $opts );
}
+
return;
}
$this->msg( 'recentchanges-feed-description' )->inContentLanguage()->text(),
$this->getTitle()->getFullURL()
);
+
return array( $changesFeed, $formatter );
}
return false;
}
}
+
return $lastmod;
}
// Calculate cutoff
$cutoff_unixtime = time() - ( $opts['days'] * 86400 );
- $cutoff_unixtime = $cutoff_unixtime - ($cutoff_unixtime % 86400);
+ $cutoff_unixtime = $cutoff_unixtime - ( $cutoff_unixtime % 86400 );
$cutoff = $dbr->timestamp( $cutoff_unixtime );
$fromValid = preg_match( '/^[0-9]{14}$/', $opts['from'] );
# Namespace filtering
if ( $opts['namespace'] !== '' ) {
$selectedNS = $dbr->addQuotes( $opts['namespace'] );
- $operator = $opts['invert'] ? '!=' : '=';
+ $operator = $opts['invert'] ? '!=' : '=';
$boolean = $opts['invert'] ? 'AND' : 'OR';
# namespace association (bug 2429)
$conds[] = $condition;
}
+
return $conds;
}
'wl_user' => $uid,
'wl_title=rc_title',
'wl_namespace=rc_namespace'
- ));
+ ) );
}
if ( $this->getUser()->isAllowed( 'rollback' ) ) {
$tables[] = 'page';
);
if ( !wfRunHooks( 'SpecialRecentChangesQuery',
- array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$fields ) ) )
- {
+ array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$fields ) )
+ ) {
return false;
}
if ( $namespace === ''
|| ( $invert || $associated )
|| $opts['tagfilter'] != ''
- || !$dbr->unionSupportsOrderAndLimit() )
- {
+ || !$dbr->unionSupportsOrderAndLimit()
+ ) {
$res = $dbr->select( $tables, $fields, $conds, __METHOD__,
array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ) +
- $query_options,
+ $query_options,
$join_conds );
- // We have a new_namespace_time index! UNION over new=(0,1) and sort result set!
} else {
+ // We have a new_namespace_time index! UNION over new=(0,1) and sort result set!
+
// New pages
$sqlNew = $dbr->selectSQLText(
$tables,
),
$join_conds
);
+
// Old pages
$sqlOld = $dbr->selectSQLText(
$tables,
),
$join_conds
);
+
# Join the two fast queries, and sort the result set
$sql = $dbr->unionQueries( array( $sqlNew, $sqlOld ), false ) .
' ORDER BY rc_timestamp DESC';
$this->filterByCategories( $rows, $opts );
}
- $showWatcherCount = $wgRCShowWatchingUsers && $this->getUser()->getOption( 'shownumberswatching' );
+ $showNumsWachting = $this->getUser()->getOption( 'shownumberswatching' );
+ $showWatcherCount = $wgRCShowWatchingUsers && $showNumsWachting;
$watcherCache = array();
$dbr = wfGetDB( DB_SLAVE );
$out .= Xml::openElement( 'tr' );
if ( is_array( $optionRow ) ) {
- $out .= Xml::tags( 'td', array( 'class' => 'mw-label mw-' . $name . '-label' ), $optionRow[0] );
- $out .= Xml::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
+ $out .= Xml::tags(
+ 'td',
+ array( 'class' => 'mw-label mw-' . $name . '-label' ),
+ $optionRow[0]
+ );
+ $out .= Xml::tags(
+ 'td',
+ array( 'class' => 'mw-input' ),
+ $optionRow[1] . $addSubmit
+ );
} else {
- $out .= Xml::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit );
+ $out .= Xml::tags(
+ 'td',
+ array( 'class' => 'mw-input', 'colspan' => 2 ),
+ $optionRow . $addSubmit
+ );
}
$out .= Xml::closeElement( 'tr' );
}
$panelString = implode( "\n", $panel );
$this->getOutput()->addHTML(
- Xml::fieldset( $this->msg( 'recentchanges-legend' )->text(), $panelString, array( 'class' => 'rcoptions' ) )
+ Xml::fieldset(
+ $this->msg( 'recentchanges-legend' )->text(),
+ $panelString,
+ array( 'class' => 'rcoptions' )
+ )
);
$this->setBottomText( $opts );
}
wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
+
return $extraOpts;
}
*
* @param FormOptions $opts
*/
- function setBottomText( FormOptions $opts ) {}
+ function setBottomText( FormOptions $opts ) {
+ }
/**
* Creates the choose namespace selection
$opts['associated'],
array( 'title' => $this->msg( 'tooltip-namespace_association' )->text() )
);
+
return array( $nsLabel, "$nsSelect $invert $associated" );
}
if ( $active ) {
$text = '<strong>' . $text . '</strong>';
}
+
return Linker::linkKnown( $this->getTitle(), $text, array(), $params );
}
$now, array( 'from' => $timestamp ), $nondefaults
);
- $rclinks = $this->msg( 'rclinks' )->rawParams( $cl, $dl, $lang->pipeList( $links ) )->parse();
+ $rclinks = $this->msg( 'rclinks' )->rawParams( $cl, $dl, $lang->pipeList( $links ) )
+ ->parse();
$rclistfrom = $this->msg( 'rclistfrom' )->rawParams( $tl )->parse();
+
return "{$note}$rclinks<br />$rclistfrom";
}
/**
- * add javascript specific to the [[Special:RecentChanges]] page
+ * Add JavaScript to the page
*/
function addRecentChangesJS() {
$this->getOutput()->addModules( array(