revise the last checkin a wee bit to ensure notifications are still sent out
This commit is contained in:
parent
4d5d93a902
commit
20f96c2c53
|
@ -261,7 +261,8 @@ function dfrn_notify_post(&$a) {
|
||||||
}
|
}
|
||||||
$posted_id = item_store($datarray);
|
$posted_id = item_store($datarray);
|
||||||
|
|
||||||
if(($posted_id) && (! $is_like)) {
|
if($posted_id) {
|
||||||
|
if(! $is_like) {
|
||||||
$r = q("SELECT `parent` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
$r = q("SELECT `parent` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||||
intval($posted_id),
|
intval($posted_id),
|
||||||
intval($importer['importer_uid'])
|
intval($importer['importer_uid'])
|
||||||
|
@ -278,13 +279,14 @@ function dfrn_notify_post(&$a) {
|
||||||
intval($importer['importer_uid']),
|
intval($importer['importer_uid']),
|
||||||
intval($posted_id)
|
intval($posted_id)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
|
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
|
||||||
|
|
||||||
proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"comment-import\" \"$posted_id\" &",
|
proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"comment-import\" \"$posted_id\" &",
|
||||||
array(),$foo));
|
array(),$foo));
|
||||||
|
|
||||||
if(($importer['notify-flags'] & NOTIFY_COMMENT) && (! $importer['self'])) {
|
if((! $is_like) && ($importer['notify-flags'] & NOTIFY_COMMENT) && (! $importer['self'])) {
|
||||||
require_once('bbcode.php');
|
require_once('bbcode.php');
|
||||||
$from = stripslashes($datarray['author-name']);
|
$from = stripslashes($datarray['author-name']);
|
||||||
$tpl = load_view_file('view/cmnt_received_eml.tpl');
|
$tpl = load_view_file('view/cmnt_received_eml.tpl');
|
||||||
|
@ -298,13 +300,11 @@ function dfrn_notify_post(&$a) {
|
||||||
'$body' => strip_tags(bbcode(stripslashes($datarray['body'])))
|
'$body' => strip_tags(bbcode(stripslashes($datarray['body'])))
|
||||||
));
|
));
|
||||||
|
|
||||||
$res = mail($importer['email'], $from . t(" commented on an item at ") . $a->config['sitename'],
|
$res = mail($importer['email'], $from . t(' commented on an item at ') . $a->config['sitename'],
|
||||||
$email_tpl,t("From: Administrator@") . $a->get_hostname() );
|
$email_tpl, "From: " . t('Administrator') . '@' . $a->get_hostname() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO send notification mail about like/dislike, but we need a new notify pref for this
|
|
||||||
|
|
||||||
xml_status(0);
|
xml_status(0);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user