]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Item.php
User-Item table is replaced
[friendica.git] / src / Model / Item.php
index 19f382b67ed995ec933e059b03bfcf057cd5ce31..5041b7ef5b6544c28cc44cdacf0a03a2207fd632 100644 (file)
@@ -1022,14 +1022,14 @@ class Item
                }
 
                // 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();
@@ -1104,9 +1104,10 @@ class Item
 
                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);