mirror of
https://github.com/friendica/friendica
synced 2025-04-22 21:10:10 +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
|
@ -204,14 +204,20 @@ class PostUpdate
|
|||
}
|
||||
|
||||
if (empty($item['psid'])) {
|
||||
$item['psid'] = PermissionSet::fetchIDForPost($item);
|
||||
} else {
|
||||
$item['allow_cid'] = null;
|
||||
$item['allow_gid'] = null;
|
||||
$item['deny_cid'] = null;
|
||||
$item['deny_gid'] = null;
|
||||
$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;
|
||||
|
||||
if ($item['post-type'] == 0) {
|
||||
if (!empty($item['type']) && ($item['type'] == 'note')) {
|
||||
$item['post-type'] = Item::PT_PERSONAL_NOTE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue