]> git.mxchange.org Git - friendica.git/blobdiff - include/enotify.php
enotify plugin hook
[friendica.git] / include / enotify.php
index a505f1f04011f2f4ff659a78a2a7546a47a7cb97..1918f26df3e2e02f523a81e222fbe29e00bbdf02 100755 (executable)
@@ -153,6 +153,33 @@ function notification($params) {
 
        }
 
+       if($params['type'] == NOTIFY_SYSTEM) {
+               
+       }
+
+       $h = array(
+               'params'    => $params, 
+               'subject'   => $subject,
+               'preamble'  => $preamble, 
+               'epreamble' => $epreamble, 
+               'body'      => $body, 
+               'sitelink'  => $sitelink,
+               'tsitelink' => $tsitelink,
+               'hsitelink' => $hsitelink,
+               'itemlink'  => $itemlink
+       );
+               
+       call_hooks('enotify',$h);
+
+       $subject   = $h['subject'];
+       $preamble  = $h['preamble'];
+       $epreamble = $h['epreamble'];
+       $body      = $h['body'];
+       $sitelink  = $h['sitelink'];
+       $tsitelink = $h['tsitelink'];
+       $hsitelink = $h['hsitelink'];
+       $itemlink  = $h['itemlink']; 
+
        // from here on everything is in the recipients language
 
        push_lang($params['language']);
@@ -223,7 +250,7 @@ function notification($params) {
        // send email notification if notification preferences permit
 
        require_once('bbcode.php');
-       if(intval($params['notify_flags']) & intval($params['type'])) {
+       if((intval($params['notify_flags']) & intval($params['type'])) || $params['type'] == NOTIFY_SYSTEM) {
 
                logger('notification: sending notification email');