* @param string $subpage
*/
function execute( $subpage ) {
- global $wgEnotifWatchlist, $wgShowUpdatedMarker;
-
// Anons don't get a watchlist
$this->requireLogin( 'watchlistanontext' );
$user = $this->getUser();
$opts = $this->getOptions();
- if ( ( $wgEnotifWatchlist || $wgShowUpdatedMarker )
+ $config = $this->getConfig();
+ if ( ( $config->get( 'EnotifWatchlist' ) || $config->get( 'ShowUpdatedMarker' ) )
&& $request->getVal( 'reset' )
&& $request->wasPosted()
) {
* @return bool|ResultWrapper Result or false (for Recentchangeslinked only)
*/
public function doMainQuery( $conds, $opts ) {
- global $wgShowUpdatedMarker;
-
$dbr = $this->getDB();
$user = $this->getUser();
),
);
- if ( $wgShowUpdatedMarker ) {
+ if ( $this->getConfig()->get( 'ShowUpdatedMarker' ) ) {
$fields[] = 'wl_notificationtimestamp';
}
if ( $limitWatchlist ) {
* @param FormOptions $opts
*/
public function outputChangesList( $rows, $opts ) {
- global $wgShowUpdatedMarker, $wgRCShowWatchingUsers;
-
$dbr = $this->getDB();
$user = $this->getUser();
$output = $this->getOutput();
$rc = RecentChange::newFromRow( $obj );
$rc->counter = $counter++;
- if ( $wgShowUpdatedMarker ) {
+ if ( $this->getConfig()->get( 'ShowUpdatedMarker' ) ) {
$updated = $obj->wl_notificationtimestamp;
} else {
$updated = false;
}
- if ( $wgRCShowWatchingUsers && $user->getOption( 'shownumberswatching' ) ) {
+ if ( $this->getConfig()->get( 'RCShowWatchingUsers' ) && $user->getOption( 'shownumberswatching' ) ) {
$rc->numberofWatchingusers = $dbr->selectField( 'watchlist',
'COUNT(*)',
array(
}
function setTopText( FormOptions $opts ) {
- global $wgEnotifWatchlist, $wgShowUpdatedMarker;
-
$nondefaults = $opts->getChangedValues();
$form = "";
$user = $this->getUser();
$dbr = $this->getDB();
$numItems = $this->countItems( $dbr );
+ $showUpdatedMarker = $this->getConfig()->get( 'ShowUpdatedMarker' );
// Show watchlist header
$form .= "<p>";
$form .= $this->msg( 'nowatchlist' )->parse() . "\n";
} else {
$form .= $this->msg( 'watchlist-details' )->numParams( $numItems )->parse() . "\n";
- if ( $wgEnotifWatchlist && $user->getOption( 'enotifwatchlistpages' ) ) {
+ if ( $this->getConfig()->get( 'EnotifWatchlist' ) && $user->getOption( 'enotifwatchlistpages' ) ) {
$form .= $this->msg( 'wlheader-enotif' )->parse() . "\n";
}
- if ( $wgShowUpdatedMarker ) {
+ if ( $showUpdatedMarker ) {
$form .= $this->msg( 'wlheader-showupdated' )->parse() . "\n";
}
}
$form .= "</p>";
- if ( $numItems > 0 && $wgShowUpdatedMarker ) {
+ if ( $numItems > 0 && $showUpdatedMarker ) {
$form .= Xml::openElement( 'form', array( 'method' => 'post',
'action' => $this->getPageTitle()->getLocalURL(),
'id' => 'mw-watchlist-resetbutton' ) ) . "\n" .