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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user