From 92ef4895b40498d97150a40b2f24fe9604e4c944 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 21 Aug 2009 06:36:55 -0400 Subject: [PATCH] can set group desc limit to unlimited without resetting global limit --- classes/User_group.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/User_group.php b/classes/User_group.php index 38e0058c13..e6e79ca6a3 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -301,7 +301,8 @@ class User_group extends Memcached_DataObject static function maxDescription() { $desclimit = common_config('group', 'desclimit'); - if (empty($desclimit)) { + // null => use global limit (distinct from 0!) + if (is_null($desclimit)) { $desclimit = common_config('site', 'textlimit'); } return $desclimit; @@ -310,6 +311,6 @@ class User_group extends Memcached_DataObject static function descriptionTooLong($desc) { $desclimit = self::maxDescription(); - return (!empty($desclimit) && !empty($desc) && (mb_strlen($desc) > $desclimit)); + return ($desclimit > 0 && !empty($desc) && (mb_strlen($desc) > $desclimit)); } } -- 2.39.5