From: Hypolite Petovan <mrpetovan@gmail.com>
Date: Mon, 26 Feb 2018 01:00:05 +0000 (-0500)
Subject: Move get_acl_permissions to Acl
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2b35938e34da9327d32f0883eae525b85ccce88a;p=friendica.git

Move get_acl_permissions to Acl
---

diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index 9eab2ffd7c..ef7eef108f 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -9,10 +9,6 @@ use Friendica\Model\Contact;
 
 require_once "mod/proxy.php";
 
-function get_acl_permissions($user = null) {
-	return Acl::getDefaultUserPermissions($user);
-}
-
 function populate_acl($user = null, $show_jotnets = false) {
 	return Acl::getFullSelectorHTML($user, $show_jotnets);
 }
diff --git a/mod/bookmarklet.php b/mod/bookmarklet.php
index 7a6a3ee21c..45c3d31907 100644
--- a/mod/bookmarklet.php
+++ b/mod/bookmarklet.php
@@ -2,7 +2,9 @@
 /**
  * @file mod/bookmarklet.php
  */
+
 use Friendica\App;
+use Friendica\Core\Acl;
 use Friendica\Core\L10n;
 use Friendica\Core\System;
 use Friendica\Module\Login;
@@ -35,7 +37,7 @@ function bookmarklet_content(App $a)
 			'default_location' => $a->user['default-location'],
 			'nickname' => $a->user['nickname'],
 			'lockstate' => ((is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid'])))) ? 'lock' : 'unlock'),
-			'default_perms' => get_acl_permissions($a->user),
+			'default_perms' => Acl::getDefaultUserPermissions($a->user),
 			'acl' => populate_acl($a->user, true),
 			'bang' => '',
 			'visitor' => 'block',
diff --git a/mod/events.php b/mod/events.php
index 695dbb290f..cf84dc7bad 100644
--- a/mod/events.php
+++ b/mod/events.php
@@ -6,6 +6,7 @@
 
 use Friendica\App;
 use Friendica\Content\Nav;
+use Friendica\Core\Acl;
 use Friendica\Core\L10n;
 use Friendica\Core\System;
 use Friendica\Core\Worker;
@@ -480,7 +481,7 @@ function events_content(App $a) {
 
 		require_once 'include/acl_selectors.php' ;
 
-		$perms = get_acl_permissions($orig_event);
+		$perms = Acl::getDefaultUserPermissions($orig_event);
 
 		if ($mode === 'new' || $mode === 'copy') {
 			$acl = (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user)));
diff --git a/mod/network.php b/mod/network.php
index c2cb8e03fc..9ab476004d 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -9,6 +9,7 @@ use Friendica\Content\Feature;
 use Friendica\Content\ForumManager;
 use Friendica\Content\Nav;
 use Friendica\Content\Widget;
+use Friendica\Core\Acl;
 use Friendica\Core\Addon;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
@@ -427,7 +428,7 @@ function networkFlatView(App $a, $update = 0)
 			'lockstate' => (((is_array($a->user) &&
 			((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) ||
 			(strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
-			'default_perms' => get_acl_permissions($a->user),
+			'default_perms' => Acl::getDefaultUserPermissions($a->user),
 			'acl' => populate_acl($a->user, true),
 			'bang' => '',
 			'visitor' => 'block',
@@ -576,7 +577,7 @@ function networkThreadedView(App $a, $update, $parent)
 			'lockstate' => ((($gid) || ($cid) || ($nets) || (is_array($a->user) &&
 			((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) ||
 			(strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
-			'default_perms' => get_acl_permissions($a->user),
+			'default_perms' => Acl::getDefaultUserPermissions($a->user),
 			'acl' => populate_acl((($gid || $cid || $nets) ? $def_acl : $a->user), true),
 			'bang' => (($gid || $cid || $nets) ? '!' : ''),
 			'visitor' => 'block',