return strcmp($date_a,$date_b);
}
+function event_delete($event_id) {
+ if ($event_id == 0)
+ return;
+ q("DELETE FROM `event` WHERE `id` = %d", intval($event_id));
+ logger("Deleted event ".$event_id, LOGGER_DEBUG);
+}
function event_store($arr) {
if(! $item['deleted'])
logger('consume_feed: deleting item ' . $item['id'] . ' uri=' . $item['uri'], LOGGER_DEBUG);
+ if($item['object-type'] === ACTIVITY_OBJ_EVENT) {
+ logger("Deleting event ".$item['event-id'], LOGGER_DEBUG);
+ event_delete($item['event-id']);
+ }
+
if(($item['verb'] === ACTIVITY_TAG) && ($item['object-type'] === ACTIVITY_OBJ_TAGTERM)) {
$xo = parse_xml_string($item['object'],false);
$xt = parse_xml_string($item['target'],false);
logger('local_delivery: deleting item ' . $item['id'] . ' uri=' . $item['uri'], LOGGER_DEBUG);
+ if($item['object-type'] === ACTIVITY_OBJ_EVENT) {
+ logger("Deleting event ".$item['event-id'], LOGGER_DEBUG);
+ event_delete($item['event-id']);
+ }
+
if(($item['verb'] === ACTIVITY_TAG) && ($item['object-type'] === ACTIVITY_OBJ_TAGTERM)) {
$xo = parse_xml_string($item['object'],false);
$xt = parse_xml_string($item['target'],false);