summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerrit Uitslag <klapinklapin@gmail.com>2014-05-20 23:00:48 +0200
committerGerrit Uitslag <klapinklapin@gmail.com>2014-05-20 23:00:48 +0200
commit0bb378687e0397cf4268ea411c65d60e6a51ddc6 (patch)
tree2739054c0c3520c25dc20dace0d62f5a73aa87cd
parent140cfbcdb4e284716917a759600e8b417668d1bd (diff)
downloadrpg-0bb378687e0397cf4268ea411c65d60e6a51ddc6.tar.gz
rpg-0bb378687e0397cf4268ea411c65d60e6a51ddc6.tar.bz2
add replacements to event data of COMMON_NOTIFY_ADDRESSLIST
-rw-r--r--inc/common.php2
-rw-r--r--inc/subscription.php8
2 files changed, 6 insertions, 4 deletions
diff --git a/inc/common.php b/inc/common.php
index f51053cc0..aea6065d0 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1310,7 +1310,7 @@ function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace =
} elseif($who == 'subscribers') {
if(!actionOK('subscribe')) return false; //subscribers enabled?
if($conf['useacl'] && $INPUT->server->str('REMOTE_USER') && $minor) return false; //skip minors
- $data = array('id' => $id, 'addresslist' => '', 'self' => false);
+ $data = array('id' => $id, 'addresslist' => '', 'self' => false, 'replacements' => $replace);
trigger_event(
'COMMON_NOTIFY_ADDRESSLIST', $data,
array(new Subscription(), 'notifyaddresses')
diff --git a/inc/subscription.php b/inc/subscription.php
index a6f3dec44..aab6de926 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -650,9 +650,11 @@ class Subscription {
* @todo move the whole functionality into this class, trigger SUBSCRIPTION_NOTIFY_ADDRESSLIST instead,
* use an array for the addresses within it
*
- * @param array &$data Containing $id (the page id), $self (whether the author
- * should be notified, $addresslist (current email address
- * list)
+ * @param array &$data Containing the entries:
+ * - $id (the page id),
+ * - $self (whether the author should be notified,
+ * - $addresslist (current email address list)
+ * - $replacements (array of additional string substitutions, @KEY@ to be replaced by value)
*/
public function notifyaddresses(&$data) {
if(!$this->isenabled()) return;