aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/output.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-29 02:26:01 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-29 02:26:01 +0000
commitb524bbf2f3ff382587d8048fcd9d08f69d6d8fa3 (patch)
tree19ea30d73f22799796a6867b307180842b6006a7 /engine/lib/output.php
parent45b492f458541dade3ee6d7a819eddcea7004616 (diff)
downloadelgg-b524bbf2f3ff382587d8048fcd9d08f69d6d8fa3.tar.gz
elgg-b524bbf2f3ff382587d8048fcd9d08f69d6d8fa3.tar.bz2
Merged r6263:6271 to trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@6285 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/output.php')
-rw-r--r--engine/lib/output.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/engine/lib/output.php b/engine/lib/output.php
index b2eb532ca..6e861e4ac 100644
--- a/engine/lib/output.php
+++ b/engine/lib/output.php
@@ -100,6 +100,10 @@ function autop($pee, $br = 1) {
function elgg_make_excerpt($text, $num_chars = 250) {
$text = trim(strip_tags($text));
$string_length = elgg_strlen($text);
+
+ if ($string_length <= $num_chars) {
+ return $text;
+ }
// handle cases
$excerpt = elgg_substr($text, 0, $num_chars);