Bugzilla – Attachment 5204 Details for
Bug 6724
Holds Ratio does not allow decimals
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug 6724: enable decimals on values greater than 1
bug-6724-enable-decimals-on-values-greater-than-1.patch (text/plain), 990 bytes, created by
Brett Wilkins
on 2011-08-29 06:03:42 UTC
(
hide
)
Description:
bug 6724: enable decimals on values greater than 1
Filename:
MIME Type:
Creator:
Brett Wilkins
Created:
2011-08-29 06:03:42 UTC
Size:
990 bytes
patch
obsolete
>From 146f326cecb8a7644ccbfba6dad0430cd3e67305 Mon Sep 17 00:00:00 2001 >From: Brett Wilkins <brett@catalyst.net.nz> >Date: Mon, 29 Aug 2011 16:47:48 +1200 >Subject: [PATCH] bug 6724: enable decimals on values greater than 1 > >--- > circ/reserveratios.pl | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl >index 5a86675..9115059 100755 >--- a/circ/reserveratios.pl >+++ b/circ/reserveratios.pl >@@ -61,10 +61,12 @@ if (!defined($startdate) or $startdate !~ s/^\s*(\S+)\s*$/$1/) { # strip space > if (!defined($enddate) or $enddate !~ s/^\s*(\S+)\s*$/$1/) { # strip spaces, remove Taint > $enddate = format_date($todaysdate); > } >-if (!defined($ratio) or $ratio !~ s/^\s*(0?\.?\d+)(\.0*)?\s*$/$1/) { # strip spaces, remove Taint >+if (!defined($ratio)) { > $ratio = 3; > } >-if ($ratio == 0) { >+# Force to be a number >+$ratio += 0; >+if ($ratio <= 0) { > $ratio = 1; # prevent division by zero > } > >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6724
:
5201
|
5202
|
5203
|
5204
|
5210