summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-08-21 06:36:55 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-08-21 06:36:55 -0400
commit92ef4895b40498d97150a40b2f24fe9604e4c944 (patch)
tree8f3eedb6c446183ff4f492ea57b60dec61fc7422
parent9828c64ae88b37c30c04dc46b826b190f39290a7 (diff)
can set group desc limit to unlimited without resetting global limit
-rw-r--r--classes/User_group.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/classes/User_group.php b/classes/User_group.php
index 38e0058c1..e6e79ca6a 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));
}
}