$now = wfTimestampNow();
$lang = $context->getLanguage();
$nowlocal = Xml::element( 'span', array( 'id' => 'wpLocalTime' ),
- $lang->time( $now, true ) );
- $nowserver = $lang->time( $now, false ) .
+ $lang->userTime( $now, $user ) );
+ $nowserver = $lang->userTime( $now, $user,
+ array( 'format' => false, 'timecorrection' => false ) ) .
Html::hidden( 'wpServerTime', (int)substr( $now, 8, 2 ) * 60 + (int)substr( $now, 10, 2 ) );
$defaultPreferences['nowserver'] = array(
'section' => 'rc/advancedrc',
'label-message' => 'tog-hidepatrolled',
);
+ }
+
+ if ( $user->useNPPatrol() ) {
$defaultPreferences['newpageshidepatrolled'] = array(
'type' => 'toggle',
'section' => 'rc/advancedrc',
$watchlistdaysMax = ceil( $config->get( 'RCMaxAge' ) / ( 3600 * 24 ) );
## Watchlist #####################################
+ if ( $user->isAllowed( 'editmywatchlist' ) ) {
+ $editWatchlistLinks = array();
+ $editWatchlistModes = array(
+ 'edit' => array( 'EditWatchlist', false ),
+ 'raw' => array( 'EditWatchlist', 'raw' ),
+ 'clear' => array( 'EditWatchlist', 'clear' ),
+ );
+ foreach ( $editWatchlistModes as $editWatchlistMode => $mode ) {
+ // Messages: prefs-editwatchlist-edit, prefs-editwatchlist-raw, prefs-editwatchlist-clear
+ $editWatchlistLinks[] = Linker::linkKnown(
+ SpecialPage::getTitleFor( $mode[0], $mode[1] ),
+ $context->msg( "prefs-editwatchlist-{$editWatchlistMode}" )->parse()
+ );
+ }
+
+ $defaultPreferences['editwatchlist'] = array(
+ 'type' => 'info',
+ 'raw' => true,
+ 'default' => $context->getLanguage()->pipeList( $editWatchlistLinks ),
+ 'label-message' => 'prefs-editwatchlist-label',
+ 'section' => 'watchlist/editwatchlist',
+ );
+ }
+
$defaultPreferences['watchlistdays'] = array(
'type' => 'float',
'min' => 0,
'label-message' => 'tog-watchlisthideliu',
);
- if ( $context->getConfig()->get( 'UseRCPatrol' ) ) {
+ if ( $user->useRCPatrol() ) {
$defaultPreferences['watchlisthidepatrolled'] = array(
'type' => 'toggle',
'section' => 'watchlist/advancedwatchlist',
$linkTools = array();
# Mark the default skin
- if ( $skinkey == $defaultSkin ) {
+ if ( strcasecmp( $skinkey, $defaultSkin ) === 0 ) {
$linkTools[] = $context->msg( 'default' )->escaped();
$foundDefault = true;
}