aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Access/PermissionLimits.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Access/PermissionLimits.php')
-rw-r--r--Zotlabs/Access/PermissionLimits.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/Zotlabs/Access/PermissionLimits.php b/Zotlabs/Access/PermissionLimits.php
index 1d15098fc..c11dc95e6 100644
--- a/Zotlabs/Access/PermissionLimits.php
+++ b/Zotlabs/Access/PermissionLimits.php
@@ -41,10 +41,8 @@ class PermissionLimits {
$limits = [];
$perms = Permissions::Perms();
- $anon_comments = get_config('system','anonymous_comments',true);
-
foreach($perms as $k => $v) {
- if(strstr($k, 'view') || ($k === 'post_comments' && $anon_comments))
+ if(strstr($k, 'view'))
$limits[$k] = PERMS_PUBLIC;
else
$limits[$k] = PERMS_SPECIFIC;
@@ -74,13 +72,13 @@ class PermissionLimits {
* @param int $channel_id
* @param string $perm (optional)
* @return
- * * \b boolean false if no perm_limits set for this channel
- * * \b int if $perm is set, return one of PERMS_* constants for this permission
+ * * \b false if no perm_limits set for this channel
+ * * \b int if $perm is set, return one of PERMS_* constants for this permission, default 0
* * \b array with all permission limits, if $perm is not set
*/
static public function Get($channel_id, $perm = '') {
if($perm) {
- return PConfig::Get($channel_id, 'perm_limits', $perm);
+ return intval(PConfig::Get($channel_id, 'perm_limits', $perm));
}
PConfig::Load($channel_id);