*/
use Friendica\App;
+use Friendica\BaseObject;
use Friendica\Content\Nav;
use Friendica\Content\Widget\CalendarExport;
use Friendica\Core\ACL;
use Friendica\Model\Item;
use Friendica\Model\Profile;
use Friendica\Module\Login;
+use Friendica\Util\ACLFormatter;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Strings;
use Friendica\Util\Temporal;
if ($share) {
- $str_group_allow = perms2str($_POST['group_allow'] ?? '');
- $str_contact_allow = perms2str($_POST['contact_allow'] ?? '');
- $str_group_deny = perms2str($_POST['group_deny'] ?? '');
- $str_contact_deny = perms2str($_POST['contact_deny'] ?? '');
+
+ /** @var ACLFormatter $aclFormatter */
+ $aclFormatter = BaseObject::getClass(ACLFormatter::class);
+
+ $str_group_allow = $aclFormatter->aclToString($_POST['group_allow'] ?? '');
+ $str_contact_allow = $aclFormatter->aclToString($_POST['contact_allow'] ?? '');
+ $str_group_deny = $aclFormatter->aclToString($_POST['group_deny'] ?? '');
+ $str_contact_deny = $aclFormatter->aclToString($_POST['contact_deny'] ?? '');
// Undo the pseudo-contact of self, since there are real contacts now
if (strpos($str_contact_allow, '<' . $self . '>') !== false) {