This fix needs to go deeper in the code. PermissionLimits::Get is called in a lot of places. If we have no stored setting for a particular permission, return 0 - which is basically no permission except to self.
This commit is contained in:
parent
8d0cbeab38
commit
d5c451c4a8
@ -74,13 +74,13 @@ class PermissionLimits {
|
|||||||
* @param int $channel_id
|
* @param int $channel_id
|
||||||
* @param string $perm (optional)
|
* @param string $perm (optional)
|
||||||
* @return
|
* @return
|
||||||
* * \b boolean false if no perm_limits set for this channel
|
* * \b false if no perm_limits set for this channel
|
||||||
* * \b int if $perm is set, return one of PERMS_* constants for this permission
|
* * \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
|
* * \b array with all permission limits, if $perm is not set
|
||||||
*/
|
*/
|
||||||
static public function Get($channel_id, $perm = '') {
|
static public function Get($channel_id, $perm = '') {
|
||||||
if($perm) {
|
if($perm) {
|
||||||
return PConfig::Get($channel_id, 'perm_limits', $perm);
|
return intval(PConfig::Get($channel_id, 'perm_limits', $perm));
|
||||||
}
|
}
|
||||||
|
|
||||||
PConfig::Load($channel_id);
|
PConfig::Load($channel_id);
|
||||||
|
Reference in New Issue
Block a user