summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
authorchris <chris@jalakai.co.uk>2006-08-22 09:24:44 +0200
committerchris <chris@jalakai.co.uk>2006-08-22 09:24:44 +0200
commit02a498e7884db0beaec6950e3b36bf4384daba93 (patch)
tree343727dac178c158b113758b777a2d97cb5af548 /inc/common.php
parentc93ca5e664887c483a60e441291b921c93747e13 (diff)
downloadrpg-02a498e7884db0beaec6950e3b36bf4384daba93.tar.gz
rpg-02a498e7884db0beaec6950e3b36bf4384daba93.tar.bz2
bug #876, additional data for new user notification email
This patch updates only the english version of the localised "registermail.txt" file. Other versions need to be updated also. darcs-hash:20060822072444-9b6ab-ff6cb5bc78277c383e82c3986eeb16168e86c27b.gz
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/inc/common.php b/inc/common.php
index bed5105fb..3064c4fda 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1111,10 +1111,11 @@ function saveOldRevision($id){
* @param int $rev Old page revision
* @param string $summary What changed
* @param boolean $minor Is this a minor edit?
+ * @param array $replace Additional string substitutions, @KEY@ to be replaced by value
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function notify($id,$who,$rev='',$summary='',$minor=false){
+function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){
global $lang;
global $conf;
@@ -1151,6 +1152,10 @@ function notify($id,$who,$rev='',$summary='',$minor=false){
$text = str_replace('@SUMMARY@',$summary,$text);
$text = str_replace('@USER@',$_SERVER['REMOTE_USER'],$text);
+ foreach ($replace as $key => $substitution) {
+ $text = str_replace('@'.strtoupper($key).'@',$substitution, $text);
+ }
+
if($who == 'register'){
$subject = $lang['mail_new_user'].' '.$summary;
}elseif($rev){