From: Ævar Arnfjörð Bjarmason Date: Tue, 26 Apr 2005 23:56:28 +0000 (+0000) Subject: * (bug 1987) Fixed small enotif errors introduced in 1.101 X-Git-Tag: 1.5.0alpha1~114 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=c81859cb35cb36d4dbff1c250ebf51a2b946d039;p=lhc%2Fweb%2Fwiklou.git * (bug 1987) Fixed small enotif errors introduced in 1.101 --- diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index 3470b8a8d4..0aa9f09890 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -421,6 +421,45 @@ class PreferencesForm { $titleObj = Title::makeTitle( NS_SPECIAL, 'Preferences' ); $action = $titleObj->escapeLocalURL(); + + # Enotif + # + $this->mUserEmail = htmlspecialchars( $this->mUserEmail ); + $this->mRealName = htmlspecialchars( $this->mRealName ); + $this->mNick = htmlspecialchars( $this->mNick ); + if ( $this->mEmailFlag ) { $emfc = 'checked="checked"'; } + else { $emfc = ''; } + + if ($wgEmailAuthentication && ($this->mUserEmail != '') ) { + if( $wgUser->getEmailAuthenticationTimestamp() ) { + $emailauthenticated = wfMsg('emailauthenticated',$wgLang->timeanddate($wgUser->getEmailAuthenticationTimestamp(), true ) ).'
'; + $disabled = ''; + } else { + $skin = $wgUser->getSkin(); + $emailauthenticated = wfMsg('emailnotauthenticated').'
' . + $skin->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, 'Confirmemail' ), + wfMsg( 'emailconfirmlink' ) ); + $disabled = ' '.wfMsg('disableduntilauthent'); + } + } else { + $emailauthenticated = ''; + } + + if ($this->mUserEmail == '') { + $disabled = ' '.wfMsg('disablednoemail'); + } + + $ps = $this->namespacesCheckboxes(); + + $enotifwatchlistpages = ($wgEmailNotificationForWatchlistPages) ? $this->getToggle( 'enotifwatchlistpages', $disabled) : ''; + $enotifusertalkpages = ($wgEmailNotificationForUserTalkPages) ? $this->getToggle( 'enotifusertalkpages', $disabled) : ''; + $enotifminoredits = ($wgEmailNotificationForMinorEdits) ? $this->getToggle( 'enotifminoredits', $disabled) : ''; + $enotifrevealaddr = ($wgEmailNotificationRevealPageEditorAddress) ? $this->getToggle( 'enotifrevealaddr', $disabled) : ''; + $prefs_help_email_enotif = ( $wgEmailNotificationForWatchlistPages || $wgEmailNotificationForUserTalkPages) ? ' ' . wfMsg('prefs-help-email-enotif') : ''; + $prefs_help_realname = ''; + + #
+ $wgOut->addHTML( "
" ); # User data @@ -513,56 +552,27 @@ class PreferencesForm { $this->addRow( wfMsg( 'retypenew' ), "mRetypePass}\" size='20' />" ) . "\n" . $this->getToggle( "rememberpassword" ) . "\n\n" ); - - # Enotif - $this->mUserEmail = htmlspecialchars( $this->mUserEmail ); - $this->mRealName = htmlspecialchars( $this->mRealName ); - $this->mNick = htmlspecialchars( $this->mNick ); - if ($wgEmailAuthentication && ($this->mUserEmail != '') ) { - if ($wgUser->getEmailAuthenticationtimestamp() != 0) { - $emailauthenticated = wfMsg('emailauthenticated', - $wgLang->timeanddate($wgUser->getEmailAuthenticationtimestamp(), true ) ).'
'; - $disabled = ''; - } else { - $emailauthenticated = wfMsg('emailnotauthenticated').'
'; - $disabled = ' '.wfMsg('disableduntilauthent'); - } - } else { - $emailauthenticated = ''; - } - - if ($this->mUserEmail == '') { - $disabled = ' '.wfMsg('disablednoemail'); - } - - $ps = $this->namespacesCheckboxes(); - - $enotifwatchlistpages = $wgEmailNotificationForWatchlistPages ? $this->getToggle( 'enotifwatchlistpages', $disabled) : ''; - $enotifusertalkpages = $wgEmailNotificationForUserTalkPages ? $this->getToggle( 'enotifusertalkpages', $disabled) : ''; - $enotifminoredits = $wgEmailNotificationForMinorEdits ? $this->getToggle( 'enotifminoredits', $disabled) : ''; - $enotifrevealaddr = $wgEmailNotificationRevealPageEditorAddress ? $this->getToggle( 'enotifrevealaddr', $disabled) : ''; - $prefs_help_email_enotif = ( $wgEmailNotificationForWatchlistPages || $wgEmailNotificationForUserTalkPages) ? ' ' . wfMsg('prefs-help-email-enotif') : ''; - if( $wgEnableEmail ) { - $wgOut->addHTML( "
" . wfMsg('email') . ""); - $wgOut->addHTML( - $emailauthenticated. - $enotifrevealaddr. - $enotifwatchlistpages. - $enotifusertalkpages. - $enotifminoredits ); - if( $wgEnableUserEmail ) { - $emfc = $this->mEmailFlag ? 'checked="checked"' : ''; - $wgOut->addHTML( - "
". - "
\n" ); - $prefs_help_realname = $wgAllowRealName ? wfMsg('prefs-help-realname') : ''; - } + # + # Enotif + if ($wgEnableEmail) { + $wgOut->addHTML( '
' . wfMsg( 'email' ) . '' ); + $wgOut->addHTML( + $emailauthenticated. + $enotifrevealaddr. + $enotifwatchlistpages. + $enotifusertalkpages. + $enotifminoredits ); + if ($wgEnableUserEmail) { + $emf = wfMsg( 'emailflag' ); + $wgOut->addHTML( + "
" ); + } + $wgOut->addHTML( '
' ); - } - + } + #
+ if ($wgAllowRealName || $wgEnableEmail) { $wgOut->addHTML("
"); $rn = $wgAllowRealName ? wfMsg('prefs-help-realname') : '';