mirror of
https://github.com/friendica/friendica
synced 2025-04-27 21:10:11 +00:00
Rename PermissionSet::fetchIDForPost to PermissionSet::getIdFromACL
- Allow creating/retrieving a permission set id with arbitrary parameters - Rename ACLformatter->sanitize to ACLFormatter->sanitizeItem - Move PermissionSet::sortPermissions to ACLformatter->sanitize
This commit is contained in:
parent
f97a358a9b
commit
353dab166e
4 changed files with 106 additions and 50 deletions
|
@ -1856,7 +1856,18 @@ class Item
|
|||
}
|
||||
|
||||
// Creates or assigns the permission set
|
||||
$item['psid'] = PermissionSet::fetchIDForPost($item);
|
||||
$item['psid'] = PermissionSet::getIdFromACL(
|
||||
$item['uid'],
|
||||
$item['allow_cid'],
|
||||
$item['allow_gid'],
|
||||
$item['deny_cid'],
|
||||
$item['deny_gid']
|
||||
);
|
||||
|
||||
$item['allow_cid'] = null;
|
||||
$item['allow_gid'] = null;
|
||||
$item['deny_cid'] = null;
|
||||
$item['deny_gid'] = null;
|
||||
|
||||
// We are doing this outside of the transaction to avoid timing problems
|
||||
if (!self::insertActivity($item)) {
|
||||
|
@ -2729,7 +2740,13 @@ class Item
|
|||
|
||||
$private = ($user['allow_cid'] || $user['allow_gid'] || $user['deny_cid'] || $user['deny_gid']) ? 1 : 0;
|
||||
|
||||
$psid = PermissionSet::fetchIDForPost($user);
|
||||
$psid = PermissionSet::getIdFromACL(
|
||||
$user['uid'],
|
||||
$user['allow_cid'],
|
||||
$user['allow_gid'],
|
||||
$user['deny_cid'],
|
||||
$user['deny_gid']
|
||||
);
|
||||
|
||||
$forum_mode = ($prvgroup ? 2 : 1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue