global $wgLang, $wgContLang;
if ( $val !== false && (
in_array( $val, (array)$wgLang->getDatePreferences() ) ||
- in_array( $val, (array)$wgContLang->getDatePreferences() ) ) )
+ in_array( $val, (array)$wgContLang->getDatePreferences() ) ) )
{
return $val;
} else {
$this->mainPrefsForm( 'error', wfMsg( 'wrongpassword' ) );
return;
}
-
+
try {
$wgUser->setPassword( $this->mNewpass );
wfRunHooks( 'PrefsPasswordAudit', array( $wgUser, $this->mNewpass, 'success' ) );
}
return Xml::tags( 'tr', null, $td1 . $td2 ). $td3 . "\n";
-
+
}
/**
}
# Password
- if( $wgAuth->allowPasswordChange() ) {
+ if( $wgAuth->allowPasswordChange() ) {
$wgOut->addHTML(
$this->tableRow( Xml::element( 'h2', null, wfMsg( 'changepassword' ) ) ) .
$this->tableRow(
# Recent changes
$wgOut->addHtml( '<fieldset><legend>' . wfMsgHtml( 'prefs-rc' ) . '</legend>' );
-
+
$rc = '<table><tr>';
$rc .= '<td>' . Xml::label( wfMsg( 'recentchangesdays' ), 'wpRecentDays' ) . '</td>';
- $rc .= '<td>' . Xml::input( 'wpRecentDays', 3, $this->mRecentDays, array( 'id' => 'wpRecentDays' ) ) . '</td>';
+ $rc .= '<td>' . Xml::input( 'wpRecentDays', 3, $this->mRecentDays, array( 'id' => 'wpRecentDays' ) ) . '</td>';
$rc .= '</tr><tr>';
$rc .= '<td>' . Xml::label( wfMsg( 'recentchangescount' ), 'wpRecent' ) . '</td>';
$rc .= '<td>' . Xml::input( 'wpRecent', 3, $this->mRecent, array( 'id' => 'wpRecent' ) ) . '</td>';
$rc .= '</tr></table>';
$wgOut->addHtml( $rc );
-
+
$wgOut->addHtml( '<br />' );
-
+
$toggles[] = 'hideminor';
if( $wgRCShowWatchingUsers )
$toggles[] = 'shownumberswatching';
# Watchlist
$wgOut->addHtml( '<fieldset><legend>' . wfMsgHtml( 'prefs-watchlist' ) . '</legend>' );
-
+
$wgOut->addHtml( wfInputLabel( wfMsg( 'prefs-watchlist-days' ), 'wpWatchlistDays', 'wpWatchlistDays', 3, $this->mWatchlistDays ) );
$wgOut->addHtml( '<br /><br />' );
$wgOut->addHtml( '<br /><br />' );
$wgOut->addHtml( $this->getToggles( array( 'watchlisthideown', 'watchlisthidebots', 'watchlisthideminor' ) ) );
-
+
if( $wgUser->isAllowed( 'createpage' ) || $wgUser->isAllowed( 'createtalk' ) )
$wgOut->addHtml( $this->getToggle( 'watchcreations' ) );
foreach( array( 'edit' => 'watchdefault', 'move' => 'watchmoves', 'delete' => 'watchdeletion' ) as $action => $toggle ) {
$this->mUsedToggles['watchdefault'] = true;
$this->mUsedToggles['watchmoves'] = true;
$this->mUsedToggles['watchdeletion'] = true;
-
+
$wgOut->addHtml( '</fieldset>' );
# Search
$wgOut->addHtml( Xml::tags( 'div', array( 'class' => "prefcache" ),
wfMsgExt( 'clearyourcache', 'parseinline' ) )
);
-
}
}
-