summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/User_group.php15
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));
+ }
}