mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
"last-child" is not used anymore
This commit is contained in:
parent
2d66242b4f
commit
034d46196f
18 changed files with 6 additions and 105 deletions
|
@ -4713,7 +4713,6 @@ function post_photo_item($hash, $allow_cid, $deny_cid, $allow_gid, $deny_gid, $f
|
|||
$arr['allow_gid'] = $allow_gid;
|
||||
$arr['deny_cid'] = $deny_cid;
|
||||
$arr['deny_gid'] = $deny_gid;
|
||||
$arr['last-child'] = 1;
|
||||
$arr['visible'] = $visibility;
|
||||
$arr['origin'] = 1;
|
||||
|
||||
|
|
|
@ -430,7 +430,6 @@ These Fields are not added below (yet). They are here to for bug search.
|
|||
`item`.`deleted`,
|
||||
`item`.`origin`,
|
||||
`item`.`forum_mode`,
|
||||
`item`.`last-child`,
|
||||
`item`.`mention`,
|
||||
`item`.`global`,
|
||||
`item`.`gcontact-id`,
|
||||
|
|
|
@ -386,7 +386,6 @@ function event_store($arr) {
|
|||
$item_arr['deny_cid'] = $arr['deny_cid'];
|
||||
$item_arr['deny_gid'] = $arr['deny_gid'];
|
||||
$item_arr['private'] = $arr['private'];
|
||||
$item_arr['last-child'] = 1;
|
||||
$item_arr['visible'] = 1;
|
||||
$item_arr['verb'] = ACTIVITY_POST;
|
||||
$item_arr['object-type'] = ACTIVITY_OBJ_EVENT;
|
||||
|
|
|
@ -487,7 +487,6 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
|
|||
$arr['wall'] = 1;
|
||||
$arr['type'] = 'wall';
|
||||
$arr['origin'] = 1;
|
||||
$arr['last-child'] = 1;
|
||||
$arr['network'] = NETWORK_DFRN;
|
||||
$arr['protocol'] = PROTOCOL_DFRN;
|
||||
|
||||
|
@ -624,7 +623,6 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
|
|||
$arr['title'] = ((x($arr, 'title')) ? trim($arr['title']) : '');
|
||||
$arr['location'] = ((x($arr, 'location')) ? trim($arr['location']) : '');
|
||||
$arr['coord'] = ((x($arr, 'coord')) ? notags(trim($arr['coord'])) : '');
|
||||
$arr['last-child'] = ((x($arr, 'last-child')) ? intval($arr['last-child']) : 0 );
|
||||
$arr['visible'] = ((x($arr, 'visible') !== false) ? intval($arr['visible']) : 1 );
|
||||
$arr['deleted'] = 0;
|
||||
$arr['parent-uri'] = ((x($arr, 'parent-uri')) ? notags(trim($arr['parent-uri'])) : $arr['uri']);
|
||||
|
@ -1112,18 +1110,6 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
|
|||
create_tags_from_item($current_post);
|
||||
Term::createFromItem($current_post);
|
||||
|
||||
/*
|
||||
* If this is now the last-child, force all _other_ children of this parent to *not* be last-child
|
||||
* It is done after the transaction to avoid dead locks.
|
||||
*/
|
||||
if ($arr['last-child']) {
|
||||
q("UPDATE `item` SET `last-child` = 0 WHERE `parent-uri` = '%s' AND `uid` = %d AND `id` != %d",
|
||||
dbesc($arr['uri']),
|
||||
intval($arr['uid']),
|
||||
intval($current_post)
|
||||
);
|
||||
}
|
||||
|
||||
if ($arr['parent-uri'] === $arr['uri']) {
|
||||
Item::addShadow($current_post);
|
||||
} else {
|
||||
|
|
|
@ -238,7 +238,6 @@ EOT;
|
|||
'deny_gid' => $item['deny_gid'],
|
||||
'visible' => 1,
|
||||
'unseen' => 1,
|
||||
'last-child' => 0
|
||||
];
|
||||
|
||||
$new_item_id = item_store($new_item);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue