summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
authormatty%chariot.net.au <>2001-11-17 19:29:54 +0100
committermatty%chariot.net.au <>2001-11-17 19:29:54 +0100
commit77398f5a2904dcbae2a650eb5910167ff26268f0 (patch)
tree34cfe664125cd998a74228880460376b5b2445e7 /globals.pl
parent684e6deb0f1f87bd51f8fdab3b8df7d432fd12c9 (diff)
downloadbugzilla-77398f5a2904dcbae2a650eb5910167ff26268f0.tar.gz
bugzilla-77398f5a2904dcbae2a650eb5910167ff26268f0.tar.xz
Bug 104677 : Votes field (text style) on showvotes.cgi defaults to size 5, not natural size and doesn't include a maxlength attribute.
Patch by Christoper Aillon <caillon@returnzero.com>.
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/globals.pl b/globals.pl
index 1654738e5..09c9934bf 100644
--- a/globals.pl
+++ b/globals.pl
@@ -21,6 +21,7 @@
# Dan Mosedale <dmose@mozilla.org>
# Jake <jake@acutex.net>
# Bradley Baetz <bbaetz@cs.mcgill.ca>
+# Christopher Aillon <christopher@aillon.com>
# Contains some global variables and routines used throughout bugzilla.
@@ -1502,6 +1503,22 @@ sub PerformSubsts {
return $str;
}
+# Min and max routines.
+sub min {
+ my $min = shift(@_);
+ foreach my $val (@_) {
+ $min = $val if $val < $min;
+ }
+ return $min;
+}
+
+sub max {
+ my $max = shift(@_);
+ foreach my $val (@_) {
+ $max = $val if $val > $max;
+ }
+ return $max;
+}
# Trim whitespace from front and back.