r76253 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76252‎ | r76253 | r76254 >
Date:16:53, 7 November 2010
Author:maxsem
Status:deferred
Tags:
Comment:
CategoryWatch: support for $wgPasswordSenderName with fallback for older versions
Modified paths:
  • /trunk/extensions/CategoryWatch/CategoryWatch.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryWatch/CategoryWatch.php
@@ -153,7 +153,10 @@
154154
155155 # Wrap message with common body and send to each watcher
156156 $page = $title->getPrefixedText();
157 - $adminAddress = new MailAddress( $wgPasswordSender, 'WikiAdmin' );
 157+ # $wgPasswordSenderName was introduced only in MW 1.17
 158+ global $wgPasswordSenderName;
 159+ $adminAddress = new MailAddress( $wgPasswordSender,
 160+ isset( $wgPasswordSenderName ) ? $wgPasswordSenderName : 'WikiAdmin' );
158161 $editorAddress = new MailAddress( $editor );
159162 $summary = $summary ? $summary : ' - ';
160163 $medit = $medit ? wfMsg( 'minoredit' ) : '';

Status & tagging log