aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Access/PermissionLimits.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-01-20 13:15:40 +0100
committerMax Kostikov <max@kostikov.co>2021-01-20 13:15:40 +0100
commit9612a69a6448331ae3296503e97ef6ce204d9be1 (patch)
treeafae1ea1fa8c63db4c23836e0ebfe57b56b808ec /Zotlabs/Access/PermissionLimits.php
parent308e94ea799b7851287fbc7635480ac13bfe3c61 (diff)
parent08264f8d11d349bbda92233d984ad52c16c6b2d6 (diff)
downloadvolse-hubzilla-9612a69a6448331ae3296503e97ef6ce204d9be1.tar.gz
volse-hubzilla-9612a69a6448331ae3296503e97ef6ce204d9be1.tar.bz2
volse-hubzilla-9612a69a6448331ae3296503e97ef6ce204d9be1.zip
Merge branch 'dev' into 'dev'
Dev sync See merge request kostikov/core!1
Diffstat (limited to 'Zotlabs/Access/PermissionLimits.php')
-rw-r--r--Zotlabs/Access/PermissionLimits.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/Zotlabs/Access/PermissionLimits.php b/Zotlabs/Access/PermissionLimits.php
index c11dc95e6..fb5fe6133 100644
--- a/Zotlabs/Access/PermissionLimits.php
+++ b/Zotlabs/Access/PermissionLimits.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Access;
+use App;
use Zotlabs\Lib\PConfig;
/**
@@ -39,10 +40,10 @@ class PermissionLimits {
*/
static public function Std_Limits() {
$limits = [];
- $perms = Permissions::Perms();
+ $perms = Permissions::Perms();
- foreach($perms as $k => $v) {
- if(strstr($k, 'view'))
+ foreach ($perms as $k => $v) {
+ if (strstr($k, 'view'))
$limits[$k] = PERMS_PUBLIC;
else
$limits[$k] = PERMS_SPECIFIC;
@@ -77,14 +78,14 @@ class PermissionLimits {
* * \b array with all permission limits, if $perm is not set
*/
static public function Get($channel_id, $perm = '') {
- if($perm) {
+ if ($perm) {
return intval(PConfig::Get($channel_id, 'perm_limits', $perm));
}
PConfig::Load($channel_id);
- if(array_key_exists($channel_id, \App::$config)
- && array_key_exists('perm_limits', \App::$config[$channel_id]))
- return \App::$config[$channel_id]['perm_limits'];
+ if (array_key_exists($channel_id, App::$config)
+ && array_key_exists('perm_limits', App::$config[$channel_id]))
+ return App::$config[$channel_id]['perm_limits'];
return false;
}