}
// Remove all fields that aren't part of the item table
- $item = DBStructure::getFieldsForTable('item', $item);
+ $table_fields = DBStructure::getFieldsForTable('item', $item);
// We remove all legacy fields that now are stored in other tables
foreach (self::LEGACY_FIELDLIST as $field) {
- unset($item[$field]);
+ unset($table_fields[$field]);
}
- $result = DBA::insert('item', $item);
+ $result = DBA::insert('item', $table_fields);
// When the item was successfully stored we fetch the ID of the item.
$current_post = DBA::lastInsertId();
self::updateContact($item);
- UserItem::setNotification($current_post);
+ Post\UserNotification::setNotification($item['uri-id'], $item['uid']);
- check_user_notification($current_post);
+ check_user_notification($item['uri-id'], $item['uid']);
+ //check_user_notification($current_post);
// Distribute items to users who subscribed to their tags
self::distributeByTags($item);