r7876 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r7875‎ | r7876 | r7877 >
Date:01:21, 26 March 2005
Author:vibber
Status:old
Tags:
Comment:
* (bug 1746) Make full subject line quoted-printable
Applied patch by Tom Gries
Modified paths:
  • /trunk/phase3/includes/UserMailer.php (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/UserMailer.php
@@ -302,7 +302,7 @@
303303 if( $article->mNamespace != NS_MAIN ) {
304304 $pagetitle = $wgLang->getNsText( $article->mNamespace ) . ':' . $pagetitle;
305305 }
306 - $subject = str_replace( '$PAGETITLE_QP', wfQuotedPrintable( str_replace( '_', ' ', $pagetitle ) ), $subject);
 306+ $subject = str_replace( '$PAGETITLE', str_replace( '_', ' ', $pagetitle ) , $subject);
307307 $keys['%24PAGETITLE_RAWURL'] = wfUrlencode( $pagetitle );
308308 $keys['$PAGETITLE_RAWURL'] = wfUrlencode( $pagetitle );
309309 $keys['%24PAGETITLE'] = $pagetitle; # needed for the {{localurl:$PAGETITLE}} in the messagetext, "$" appears here as "%24"
@@ -316,9 +316,9 @@
317317 # Reveal the page editor's address as REPLY-TO address only if
318318 # the user has not opted-out and the option is enabled at the
319319 # global configuration level.
320 - $pageeditor_qp = wfQuotedPrintable( $pageeditorUser->getName() );
 320+ $name = $pageeditorUser->getName();
321321 $adminAddress = 'WikiAdmin <' . $wgEmergencyContact . '>';
322 - $editorAddress = $pageeditorUser->getName() . ' <' . $pageeditorUser->getEmail() . '>';
 322+ $editorAddress = $name . ' <' . $pageeditorUser->getEmail() . '>';
323323 if( $wgEmailNotificationRevealPageEditorAddress
324324 && ( $pageeditorUser->getEmail() != '' )
325325 && $pageeditorUser->getOption( 'enotifrevealaddr' ) ) {
@@ -335,12 +335,11 @@
336336 $keys['$PAGEEDITORNAMEANDEMAILADDR'] = $replyto;
337337 }
338338
339 - if( $pageeditorUser->isIP( $pageeditorUser->getName() ) ) {
 339+ if( $pageeditorUser->isIP( $name ) ) {
340340 #real anon (user:xxx.xxx.xxx.xxx)
341 - $subject = str_replace('$PAGEEDITOR_QP', 'anonymous user ' . $pageeditorUser->getName(), $subject);
342 - $name = $pageeditorUser->getName();
343341 $anon = $name . ' (anonymous user)';
344342 $anonUrl = wfUrlencode( $name ) . ' (anonymous user)';
 343+ $subject = str_replace('$PAGEEDITOR', 'anonymous user '. $name, $subject);
345344
346345 $keys['$PAGEEDITOR_RAWURL'] = $anonUrl;
347346 $keys['%24PAGEEDITOR_RAWURL'] = $anonUrl;
@@ -348,13 +347,13 @@
349348 $keys['$PAGEEDITORE'] = $anon;
350349 $keys['$PAGEEDITOR'] = 'anonymous user ' . $name;
351350 } else {
352 - $name = $pageeditorUser->getName();
353 - $subject = str_replace('$PAGEEDITOR_QP', $pageeditor_qp, $subject);
 351+ $subject = str_replace('$PAGEEDITOR', $name, $subject);
354352 $keys['$PAGEEDITOR_RAWURL'] = wfUrlencode( $name );
355353 $keys['%24PAGEEDITOR_RAWURL'] = wfUrlencode( $name );
356354 $keys['%24PAGEEDITORE'] = $pageeditorUser->getTitleKey();
357355 $keys['$PAGEEDITORE'] = $pageeditorUser->getTitleKey();
358356 $keys['$PAGEEDITOR'] = $pageeditorUser->getName();
 357+ $keys['$PAGEEDITOR'] = $name;
359358 }
360359 $body = strtr( $body, $keys );
361360
@@ -362,7 +361,7 @@
363362 $this->to = $to;
364363 $this->from = $from;
365364 $this->replyto = $replyto;
366 - $this->subject = $subject;
 365+ $this->subject = wfQuotedprintable($subject);
367366 $this->body = $body;
368367 return $this;
369368 }
Index: trunk/phase3/languages/Language.php
@@ -1243,7 +1243,7 @@
12441244 'email_notification_reset' => 'Reset all notification flags (set their status to "visited")',
12451245 'email_notification_newpagetext'=> 'This is a new page.',
12461246 'email_notification_to' => '$WATCHINGUSERNAME_QP <$WATCHINGUSEREMAILADDR>',
1247 -'email_notification_subject' => '{{SITENAME}} page $PAGETITLE_QP has been changed by $PAGEEDITOR_QP',
 1247+'email_notification_subject' => '{{SITENAME}} page $PAGETITLE has been changed by $PAGEEDITOR',
12481248 'email_notification_lastvisitedrevisiontext' => 'See {{SERVER}}{{localurl:$PAGETITLE_RAWURL|diff=0&oldid=$OLDID}} for all changes since your last visit.',
12491249 'email_notification_body' => 'Dear $WATCHINGUSERNAME,
12501250

Follow-up revisions

RevisionCommit summaryAuthorDate
r78817Followup r7876: fix the rest of the extensions. Merge the QueryPage and Speci...catrope18:32, 22 December 2010

Status & tagging log