The never ending saga of parent = 0 bugs on Dreamhost.
This commit is contained in:
parent
bc1afbc762
commit
d83460cd2a
@ -2087,6 +2087,16 @@ function item_store($arr,$allow_exec = false) {
|
|||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
|
|
||||||
|
// in case item_store was killed before the parent's parent attribute got set,
|
||||||
|
// set it now. This happens with some regularity on Dreamhost. This will keep
|
||||||
|
// us from getting notifications for threads that exist but which we can't see.
|
||||||
|
|
||||||
|
if(($r[0]['mid'] === $r[0]['parent_mid']) && (! intval($r[0]['parent']))) {
|
||||||
|
q("update item set parent = id where id = %d",
|
||||||
|
intval($r[0]['id'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if(comments_are_now_closed($r[0])) {
|
if(comments_are_now_closed($r[0])) {
|
||||||
logger('item_store: comments closed');
|
logger('item_store: comments closed');
|
||||||
$ret['message'] = 'Comments closed.';
|
$ret['message'] = 'Comments closed.';
|
||||||
|
@ -287,7 +287,7 @@ function ping_init(&$a) {
|
|||||||
$result[] = format_notification($item);
|
$result[] = format_notification($item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger('ping (network||home): ' . print_r($result, true), LOGGER_DATA);
|
// logger('ping (network||home): ' . print_r($result, true), LOGGER_DATA);
|
||||||
echo json_encode(array('notify' => $result));
|
echo json_encode(array('notify' => $result));
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user