diff options
author | zottel <github@zottel.net> | 2012-03-16 08:33:01 +0100 |
---|---|---|
committer | zottel <github@zottel.net> | 2012-03-16 08:33:01 +0100 |
commit | ea4c806c5c3adacb6ef585de657e5f34c2e24c98 (patch) | |
tree | 1e3314f76eefd8f7d014ae8e4a218dc9663ae3d7 /include/notifier.php | |
parent | 69f4448adaf7afddf00deeb2f832938d5505abcf (diff) | |
parent | 47e1b8d0c07d79c33f8b2de52145aa751d4b955a (diff) | |
download | volse-hubzilla-ea4c806c5c3adacb6ef585de657e5f34c2e24c98.tar.gz volse-hubzilla-ea4c806c5c3adacb6ef585de657e5f34c2e24c98.tar.bz2 volse-hubzilla-ea4c806c5c3adacb6ef585de657e5f34c2e24c98.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/notifier.php')
-rwxr-xr-x | include/notifier.php | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/include/notifier.php b/include/notifier.php index 5b23406fc..07edc7046 100755 --- a/include/notifier.php +++ b/include/notifier.php @@ -648,38 +648,23 @@ function notifier_run($argv, $argc){ $headers .= 'Reply-to: ' . $reply_to . "\n"; // for testing purposes: Collect exported mails - $file = tempnam("/tmp/friendica/", "mail-out2-"); - file_put_contents($file, json_encode($it)); + //$file = tempnam("/tmp/friendica/", "mail-out2-"); + //file_put_contents($file, json_encode($it)); $headers .= 'Message-Id: <' . iri2msgid($it['uri']) . '>' . "\n"; if($it['uri'] !== $it['parent-uri']) { $headers .= 'References: <' . iri2msgid($it['parent-uri']) . '>' . "\n"; - if(! strlen($it['title'])) { + if(!strlen($it['title'])) { $r = q("SELECT `title` FROM `item` WHERE `parent-uri` = '%s' LIMIT 1", - dbesc($it['parent-uri']) - ); - if(count($r)) { - $subtitle = $r[0]['title']; - if($subtitle) { - if(strncasecmp($subtitle,'RE:',3)) - $subject = $subtitle; - else - $subject = 'Re: ' . $subtitle; - } - } + dbesc($it['parent-uri'])); + + if(count($r) AND ($r[0]['title'] != '')) + $subject = $r[0]['title']; } + if(strncasecmp($subject,'RE:',3)) + $subject = 'Re: '.$subject; } - - /*$headers .= 'MIME-Version: 1.0' . "\n"; - //$headers .= 'Content-Type: text/html; charset=UTF-8' . "\n"; - $headers .= 'Content-Type: text/plain; charset=UTF-8' . "\n"; - $headers .= 'Content-Transfer-Encoding: 8bit' . "\n\n"; - $html = prepare_body($it); - //$message = '<html><body>' . $html . '</body></html>'; - $message = html2plain($html); - logger('notifier: email delivery to ' . $addr); - mail($addr, $subject, $message, $headers);*/ email_send($addr, $subject, $headers, $it); } break; |