summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2012-11-16 18:10:32 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2012-11-16 18:10:32 +0100
commit5fc1b86cfeeaf5e8e64dfbef3cd94f13a899d696 (patch)
tree78d6f36b43b9b6349af76fabeb8750af1a89f177 /Bugzilla/Template.pm
parent7605239f64f0b47fe3e96a9be0e07700b7bb5c7c (diff)
downloadbugzilla-5fc1b86cfeeaf5e8e64dfbef3cd94f13a899d696.tar.gz
bugzilla-5fc1b86cfeeaf5e8e64dfbef3cd94f13a899d696.tar.xz
Bug 797636: Improve performance for buglists
r=dkl a=LpSolit
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index d00799900..e13efec2b 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -562,10 +562,9 @@ $Template::Stash::SCALAR_OPS->{ 0 } =
$Template::Stash::SCALAR_OPS->{ truncate } =
sub {
my ($string, $length, $ellipsis) = @_;
- $ellipsis ||= "";
-
return $string if !$length || length($string) <= $length;
-
+
+ $ellipsis ||= '';
my $strlen = $length - length($ellipsis);
my $newstr = substr($string, 0, $strlen) . $ellipsis;
return $newstr;