]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_notify.php
template for photo display
[friendica.git] / mod / dfrn_notify.php
index dd6866b385c8e084be3a2e7845ff9a6d28491310..eb9d71fe3f3cb5d5093f6e1c7c08a488e6bf70b0 100644 (file)
@@ -80,6 +80,14 @@ function dfrn_notify_post(&$a) {
 
        $importer = $r[0];
 
+       if(($writable != (-1)) && ($writable != $importer['writable'])) {
+               q("UPDATE `contact` SET `writable` = %d WHERE `id` = %d LIMIT 1",
+                       intval($writable),
+                       intval($importer['id'])
+               );
+               $importer['writable'] = $writable;
+       }
+
        logger('dfrn_notify: received notify from ' . $importer['name'] . ' for ' . $importer['username']);
        logger('dfrn_notify: data: ' . $data, LOGGER_DATA);
 
@@ -124,8 +132,6 @@ function dfrn_notify_post(&$a) {
        }
 
 
-
-
        if($importer['readonly']) {
                // We aren't receiving stuff from this person. But we will quietly ignore them
                // rather than a blatant "go away" message.
@@ -395,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);
@@ -481,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;
                                                }
                                        }