diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/dfrn_notify.php | 8 | ||||
-rw-r--r-- | mod/redir.php | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 1164bafe3..7bcf2af09 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -92,8 +92,8 @@ function dfrn_notify_post(&$a) { '$body' => strip_tags(bbcode($msg['body'])) )); - $res = mail($importer['email'], t("New mail received at ") . $a->config['sitename'], - $email_tpl,t("From: Administrator@") . $a->get_hostname() ); + $res = mail($importer['email'], t('New mail received at ') . $a->config['sitename'], + $email_tpl, 'From: ' . t('Administrator') . '@' . $a->get_hostname() ); } xml_status(0); return; // NOTREACHED @@ -109,7 +109,7 @@ function dfrn_notify_post(&$a) { $deleted = false; - $rawdelete = $item->get_item_tags("http://purl.org/atompub/tombstones/1.0", 'deleted-entry'); + $rawdelete = $item->get_item_tags( NAMESPACE_TOMB , 'deleted-entry'); if(isset($rawdelete[0]['attribs']['']['ref'])) { $uri = $rawthread[0]['attribs']['']['ref']; $deleted = true; @@ -170,7 +170,7 @@ function dfrn_notify_post(&$a) { $is_reply = false; $item_id = $item->get_id(); - $rawthread = $item->get_item_tags("http://purl.org/syndication/thread/1.0",'in-reply-to'); + $rawthread = $item->get_item_tags( NAMESPACE_THREAD, 'in-reply-to'); if(isset($rawthread[0]['attribs']['']['ref'])) { $is_reply = true; $parent_uri = $rawthread[0]['attribs']['']['ref']; diff --git a/mod/redir.php b/mod/redir.php index 88b291146..688e516ab 100644 --- a/mod/redir.php +++ b/mod/redir.php @@ -10,7 +10,9 @@ function redir_init(&$a) { if(! count($r)) goaway($a->get_baseurl()); - $dfrn_id = (($r[0]['duplex']) ? $r[0]['dfrn-id'] : $r[0]['issued-id']); + $dfrn_id = $r[0]['issued-id']; + if((! $dfrn_id) && ($r[0]['duplex'])) + $dfrn_id = $r[0]['dfrn-id']; q("INSERT INTO `profile_check` ( `uid`, `dfrn_id`, `expire`) VALUES( %d, '%s', %d )", @@ -20,5 +22,4 @@ function redir_init(&$a) { goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id . '&type=profile'); - }
\ No newline at end of file |