From: Brion Vibber Date: Sat, 26 Mar 2005 01:21:01 +0000 (+0000) Subject: * (bug 1746) Make full subject line quoted-printable X-Git-Tag: 1.5.0alpha1~523 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=a8e068a2479ca6f05efb7a747cf9bbf9b936e4d2;p=lhc%2Fweb%2Fwiklou.git * (bug 1746) Make full subject line quoted-printable Applied patch by Tom Gries --- diff --git a/includes/UserMailer.php b/includes/UserMailer.php index aa37f4c72b..4670eaf43c 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -302,7 +302,7 @@ class EmailNotification { if( $article->mNamespace != NS_MAIN ) { $pagetitle = $wgLang->getNsText( $article->mNamespace ) . ':' . $pagetitle; } - $subject = str_replace( '$PAGETITLE_QP', wfQuotedPrintable( str_replace( '_', ' ', $pagetitle ) ), $subject); + $subject = str_replace( '$PAGETITLE', str_replace( '_', ' ', $pagetitle ) , $subject); $keys['%24PAGETITLE_RAWURL'] = wfUrlencode( $pagetitle ); $keys['$PAGETITLE_RAWURL'] = wfUrlencode( $pagetitle ); $keys['%24PAGETITLE'] = $pagetitle; # needed for the {{localurl:$PAGETITLE}} in the messagetext, "$" appears here as "%24" @@ -316,9 +316,9 @@ class EmailNotification { # Reveal the page editor's address as REPLY-TO address only if # the user has not opted-out and the option is enabled at the # global configuration level. - $pageeditor_qp = wfQuotedPrintable( $pageeditorUser->getName() ); + $name = $pageeditorUser->getName(); $adminAddress = 'WikiAdmin <' . $wgEmergencyContact . '>'; - $editorAddress = $pageeditorUser->getName() . ' <' . $pageeditorUser->getEmail() . '>'; + $editorAddress = $name . ' <' . $pageeditorUser->getEmail() . '>'; if( $wgEmailNotificationRevealPageEditorAddress && ( $pageeditorUser->getEmail() != '' ) && $pageeditorUser->getOption( 'enotifrevealaddr' ) ) { @@ -335,12 +335,11 @@ class EmailNotification { $keys['$PAGEEDITORNAMEANDEMAILADDR'] = $replyto; } - if( $pageeditorUser->isIP( $pageeditorUser->getName() ) ) { + if( $pageeditorUser->isIP( $name ) ) { #real anon (user:xxx.xxx.xxx.xxx) - $subject = str_replace('$PAGEEDITOR_QP', 'anonymous user ' . $pageeditorUser->getName(), $subject); - $name = $pageeditorUser->getName(); $anon = $name . ' (anonymous user)'; $anonUrl = wfUrlencode( $name ) . ' (anonymous user)'; + $subject = str_replace('$PAGEEDITOR', 'anonymous user '. $name, $subject); $keys['$PAGEEDITOR_RAWURL'] = $anonUrl; $keys['%24PAGEEDITOR_RAWURL'] = $anonUrl; @@ -348,13 +347,13 @@ class EmailNotification { $keys['$PAGEEDITORE'] = $anon; $keys['$PAGEEDITOR'] = 'anonymous user ' . $name; } else { - $name = $pageeditorUser->getName(); - $subject = str_replace('$PAGEEDITOR_QP', $pageeditor_qp, $subject); + $subject = str_replace('$PAGEEDITOR', $name, $subject); $keys['$PAGEEDITOR_RAWURL'] = wfUrlencode( $name ); $keys['%24PAGEEDITOR_RAWURL'] = wfUrlencode( $name ); $keys['%24PAGEEDITORE'] = $pageeditorUser->getTitleKey(); $keys['$PAGEEDITORE'] = $pageeditorUser->getTitleKey(); $keys['$PAGEEDITOR'] = $pageeditorUser->getName(); + $keys['$PAGEEDITOR'] = $name; } $body = strtr( $body, $keys ); @@ -362,7 +361,7 @@ class EmailNotification { $this->to = $to; $this->from = $from; $this->replyto = $replyto; - $this->subject = $subject; + $this->subject = wfQuotedprintable($subject); $this->body = $body; return $this; } diff --git a/languages/Language.php b/languages/Language.php index 73233950e3..dd14786c48 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1243,7 +1243,7 @@ You will be notified by email when someone changes a page which is listed in you 'email_notification_reset' => 'Reset all notification flags (set their status to "visited")', 'email_notification_newpagetext'=> 'This is a new page.', 'email_notification_to' => '$WATCHINGUSERNAME_QP <$WATCHINGUSEREMAILADDR>', -'email_notification_subject' => '{{SITENAME}} page $PAGETITLE_QP has been changed by $PAGEEDITOR_QP', +'email_notification_subject' => '{{SITENAME}} page $PAGETITLE has been changed by $PAGEEDITOR', 'email_notification_lastvisitedrevisiontext' => 'See {{SERVER}}{{localurl:$PAGETITLE_RAWURL|diff=0&oldid=$OLDID}} for all changes since your last visit.', 'email_notification_body' => 'Dear $WATCHINGUSERNAME,