diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-08-21 06:13:41 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-08-21 06:33:22 -0400 |
commit | cd688acceb131312e10a219700ba21d4a3566695 (patch) | |
tree | 31f5d4d8af27d5677ba25e9fe438f02be53f6ed9 /classes/User_group.php | |
parent | a28bbdfb0fcc5ec253a0ab6f94a6f0eeda0d21dc (diff) |
allow configurable length for user group description
Diffstat (limited to 'classes/User_group.php')
-rw-r--r-- | classes/User_group.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/classes/User_group.php b/classes/User_group.php index 7b0daad94..38e0058c1 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -297,4 +297,19 @@ class User_group extends Memcached_DataObject return $ids; } + + static function maxDescription() + { + $desclimit = common_config('group', 'desclimit'); + if (empty($desclimit)) { + $desclimit = common_config('site', 'textlimit'); + } + return $desclimit; + } + + static function descriptionTooLong($desc) + { + $desclimit = self::maxDescription(); + return (!empty($desclimit) && !empty($desc) && (mb_strlen($desc) > $desclimit)); + } } |