aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_notify.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-12-03 12:37:57 -0800
committerFriendika <info@friendika.com>2010-12-03 12:37:57 -0800
commit20f96c2c539f8f809335498ef2a78d96549cc6be (patch)
tree5262c327d1defb1e035041f7fbb84fb4c5bdd9db /mod/dfrn_notify.php
parent4d5d93a9020c1750013ff3381da791db44c97eb2 (diff)
downloadvolse-hubzilla-20f96c2c539f8f809335498ef2a78d96549cc6be.tar.gz
volse-hubzilla-20f96c2c539f8f809335498ef2a78d96549cc6be.tar.bz2
volse-hubzilla-20f96c2c539f8f809335498ef2a78d96549cc6be.zip
revise the last checkin a wee bit to ensure notifications are still sent out
Diffstat (limited to 'mod/dfrn_notify.php')
-rw-r--r--mod/dfrn_notify.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php
index 958d747d0..e4aabba5a 100644
--- a/mod/dfrn_notify.php
+++ b/mod/dfrn_notify.php
@@ -261,30 +261,32 @@ function dfrn_notify_post(&$a) {
}
$posted_id = item_store($datarray);
- if(($posted_id) && (! $is_like)) {
- $r = q("SELECT `parent` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval($posted_id),
- intval($importer['importer_uid'])
- );
- if(count($r)) {
- $r1 = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `uid` = %d AND `parent` = %d",
- dbesc(datetime_convert()),
- intval($importer['importer_uid']),
- intval($r[0]['parent'])
+ if($posted_id) {
+ if(! $is_like) {
+ $r = q("SELECT `parent` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ intval($posted_id),
+ intval($importer['importer_uid'])
+ );
+ if(count($r)) {
+ $r1 = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `uid` = %d AND `parent` = %d",
+ dbesc(datetime_convert()),
+ intval($importer['importer_uid']),
+ intval($r[0]['parent'])
+ );
+ }
+ $r2 = q("UPDATE `item` SET `last-child` = 1, `changed` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1",
+ dbesc(datetime_convert()),
+ intval($importer['importer_uid']),
+ intval($posted_id)
);
}
- $r2 = q("UPDATE `item` SET `last-child` = 1, `changed` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1",
- dbesc(datetime_convert()),
- intval($importer['importer_uid']),
- intval($posted_id)
- );
$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\" &",
array(),$foo));
- if(($importer['notify-flags'] & NOTIFY_COMMENT) && (! $importer['self'])) {
+ if((! $is_like) && ($importer['notify-flags'] & NOTIFY_COMMENT) && (! $importer['self'])) {
require_once('bbcode.php');
$from = stripslashes($datarray['author-name']);
$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'])))
));
- $res = mail($importer['email'], $from . t(" commented on an item at ") . $a->config['sitename'],
- $email_tpl,t("From: Administrator@") . $a->get_hostname() );
+ $res = mail($importer['email'], $from . t(' commented on an item at ') . $a->config['sitename'],
+ $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);
// NOTREACHED