r98538 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98537‎ | r98538 | r98539 >
Date:17:12, 30 September 2011
Author:mah
Status:ok
Tags:
Comment:
make subjects configurable
Modified paths:
  • /trunk/tools/fixme-nagger/fixme.php (modified) (history)

Diff [purge]

Index: trunk/tools/fixme-nagger/fixme.php
@@ -121,6 +121,10 @@
122122 }
123123
124124 public function sendMail($author, $revs) {
 125+ global $conf;
 126+ if( !isset( $conf['subject'] ) ) {
 127+ exit("No email subject given in .ini file. Not sending any email.\n");
 128+ }
125129 $user = $this->getUserinfo($author);
126130
127131 $commits = " Rev #: Commit message\n";
@@ -137,7 +141,7 @@
138142 echo "Would email $user[email] from " . $this->fromAddy. "\n";
139143 echo $msg;
140144 } else {
141 - mail( $user['email'], "Please fix your FIXMEs", $msg, false, "-f " . $this->fromAddy );
 145+ mail( $user['email'], $conf['subject'], $msg, false, "-f " . $this->fromAddy );
142146 }
143147 }
144148 }

Status & tagging log