diff options
author | tony baldwin <tonybaldwin@gmx.com> | 2012-03-21 01:36:23 -0400 |
---|---|---|
committer | tony baldwin <tonybaldwin@gmx.com> | 2012-03-21 01:36:23 -0400 |
commit | e5c29fcc786cee73c08247824cb87e9ed65a2c36 (patch) | |
tree | 1e5a6fcf5ba20e5effdd60e6d6ffa5fadb11d9d7 /include/notifier.php | |
parent | cf17606d0f6200296b1e6d67f9ae3fb797e0df69 (diff) | |
parent | b4a2dae0850ed72b61b008e44efa98f300ccd640 (diff) | |
download | volse-hubzilla-e5c29fcc786cee73c08247824cb87e9ed65a2c36.tar.gz volse-hubzilla-e5c29fcc786cee73c08247824cb87e9ed65a2c36.tar.bz2 volse-hubzilla-e5c29fcc786cee73c08247824cb87e9ed65a2c36.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/notifier.php')
-rwxr-xr-x | include/notifier.php | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/include/notifier.php b/include/notifier.php index 5b23406fc..d63ad7ae7 100755 --- a/include/notifier.php +++ b/include/notifier.php @@ -337,7 +337,9 @@ function notifier_run($argv, $argc){ '$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) , '$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) , '$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) , - '$birthday' => $birthday + '$birthday' => $birthday, + '$community' => (($owner['page-flags'] == PAGE_COMMUNITY) ? '<dfrn:community>1</dfrn:community>' : '') + )); if($mail) { @@ -648,38 +650,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; |