Commit d5c451c4 authored by Zot's avatar Zot

This fix needs to go deeper in the code. PermissionLimits::Get is called in a...

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.
parent 8d0cbeab
......@@ -74,13 +74,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment