]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_notify.php
fix json_encode on url's
[friendica.git] / mod / dfrn_notify.php
index f6f68d348c4e53e82c863aa180a1cd1f8743e3ee..9ea9803385de82e046677178baffa492571406d0 100644 (file)
@@ -210,7 +210,7 @@ function dfrn_notify_post(&$a) {
                                = html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r","\\n\\n" ,"\\n"), "<br />\n",$msg['body']))));
 
                        // load the template for private message notifications
-                       $tpl = load_view_file('view/mail_received_html_body_eml.tpl');
+                       $tpl = get_intltext_template('mail_received_html_body_eml.tpl');
                        $email_html_body_tpl = replace_macros($tpl,array(
                                '$siteName'             => $a->config['sitename'],                              // name of this site
                                '$siteurl'              => $a->get_baseurl(),                                   // descriptive url of this site
@@ -225,7 +225,7 @@ function dfrn_notify_post(&$a) {
                        ));
                        
                        // load the template for private message notifications
-                       $tpl = load_view_file('view/mail_received_text_body_eml.tpl');
+                       $tpl = get_intltext_template('mail_received_text_body_eml.tpl');
                        $email_text_body_tpl = replace_macros($tpl,array(
                                '$siteName'             => $a->config['sitename'],                              // name of this site
                                '$siteurl'              => $a->get_baseurl(),                                   // descriptive url of this site
@@ -389,7 +389,7 @@ function dfrn_notify_post(&$a) {
                                                if((! $is_like) && ($importer['notify-flags'] & NOTIFY_COMMENT) && (! $importer['self'])) {
                                                        require_once('bbcode.php');
                                                        $from = stripslashes($datarray['author-name']);
-                                                       $tpl = load_view_file('view/cmnt_received_eml.tpl');                    
+                                                       $tpl = get_intltext_template('cmnt_received_eml.tpl');                  
                                                        $email_tpl = replace_macros($tpl, array(
                                                                '$sitename' => $a->config['sitename'],
                                                                '$siteurl' =>  $a->get_baseurl(),
@@ -401,7 +401,11 @@ function dfrn_notify_post(&$a) {
                                                        ));
        
                                                        $res = mail($importer['email'], sprintf(t('%s commented on an item at %s'), $from , $a->config['sitename']),
-                                                               $email_tpl, "From: " . t('Administrator') . '@' . $a->get_hostname() );
+                                                               $email_tpl, 
+                                                               'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                                                               . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                                                               . 'Content-transfer-encoding: 8bit' );
+
                                                }
                                        }
                                        xml_status(0);
@@ -475,7 +479,7 @@ function dfrn_notify_post(&$a) {
                                                                continue;
                                                        require_once('bbcode.php');
                                                        $from = stripslashes($datarray['author-name']);
-                                                       $tpl = load_view_file('view/cmnt_received_eml.tpl');    
+                                                       $tpl = get_intltext_template('cmnt_received_eml.tpl');  
                                                        $email_tpl = replace_macros($tpl, array(
                                                                '$sitename' => $a->config['sitename'],
                                                                '$siteurl' =>  $a->get_baseurl(),
@@ -487,7 +491,11 @@ function dfrn_notify_post(&$a) {
                                                        ));
 
                                                        $res = mail($importer['email'], sprintf( t("%s commented on an item at %s") , $from ,$a->config['sitename']),
-                                                               $email_tpl, "From: ".t("Administrator") . "@". $a->get_hostname() );
+                                                               $email_tpl, 
+                                                               'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                                                               . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                                                               . 'Content-transfer-encoding: 8bit' );
+
                                                        break;
                                                }
                                        }