From: Evan Prodromou Date: Fri, 21 Aug 2009 10:36:55 +0000 (-0400) Subject: can set group desc limit to unlimited without resetting global limit X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=92ef4895b40498d97150a40b2f24fe9604e4c944;p=quix0rs-gnu-social.git can set group desc limit to unlimited without resetting global limit --- 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)); } }