mirror of
https://github.com/friendica/friendica
synced 2025-04-25 19:10:11 +00:00
Item storage: Permissions aren't stored in the items anymore (#5495)
* The permission set is now used for item permissions * Check for allow_cid, ... is superfluous. Checking for "private" is enough * We query the permissionset * Permissions are displayed correctly * Changed index * We don't store the permissions in the item table anymore * Permission fields are now deprecated * Reversed ...
This commit is contained in:
parent
830b2edc35
commit
986106a8f7
9 changed files with 117 additions and 96 deletions
|
@ -70,8 +70,6 @@ class PostUpdate
|
|||
AND `item`.`visible` AND NOT `item`.`private`
|
||||
AND NOT `item`.`deleted` AND NOT `item`.`moderated`
|
||||
AND `item`.`network` IN ('%s', '%s', '%s', '')
|
||||
AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
|
||||
AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
|
||||
AND NOT `item`.`global`";
|
||||
|
||||
$r = q($query1.$query2.$query3." ORDER BY `item`.`id` LIMIT 1",
|
||||
|
@ -264,7 +262,8 @@ class PostUpdate
|
|||
$item['owner-id'] = Contact::getIdForURL($item["owner-link"], 0, false, $default);
|
||||
}
|
||||
|
||||
if (empty($item['psid'])) {
|
||||
if (!is_null($item['allow_cid']) && !is_null($item['allow_gid'])
|
||||
&& !is_null($item['deny_cid']) && !is_null($item['deny_gid'])) {
|
||||
$item['psid'] = PermissionSet::fetchIDForPost($item);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue