public fields fix

This commit is contained in:
Philipp 2021-10-18 23:31:33 +02:00
parent d470a6a981
commit cf38b62993
No known key found for this signature in database
GPG key ID: 24A7501396EB5432

View file

@ -55,6 +55,7 @@ use Friendica\Model\Photo;
use Friendica\Model\Post; use Friendica\Model\Post;
use Friendica\Model\Profile; use Friendica\Model\Profile;
use Friendica\Model\Storage; use Friendica\Model\Storage;
use Friendica\Security\PermissionSet\Depository\PermissionSet;
use Friendica\Worker\Delivery; use Friendica\Worker\Delivery;
// Post-update script of PR 5751 // Post-update script of PR 5751
@ -1028,3 +1029,12 @@ function update_1439()
} }
DBA::close($intros); DBA::close($intros);
} }
function update_1440()
{
// Fix wrong public permissionset
DBA::p("UPDATE `profile_field` SET `psid` = ? WHERE psid IN (SELECT `id` FROM `permissionset` WHERE `id` != ? AND `allow_cid` = '' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '')", PermissionSet::PUBLIC, PermissionSet::PUBLIC);
DBA::delete('permissionset', ["`id` != ? AND `allow_cid` = '' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = ''", PermissionSet::PUBLIC]);
return Update::SUCCESS;
}