diff --git a/lib/WebGUI/Macro/Splat_random.pm b/lib/WebGUI/Macro/Splat_random.pm index c5d819b34..c1e982b67 100644 --- a/lib/WebGUI/Macro/Splat_random.pm +++ b/lib/WebGUI/Macro/Splat_random.pm @@ -35,13 +35,14 @@ used as a default. #------------------------------------------------------------------- sub process { my $session = shift; - my ($temp, @param); + my ($temp, @param, $limit); @param = @_; if ($param[0] ne "") { - $temp = round(rand()*$param[0]); + $limit = $param[0]; } else { - $temp = round(rand()*1000000000); + $limit = 1000000000; } + $temp = round(rand($limit)); return $temp; } diff --git a/lib/WebGUI/i18n/English/Macro_Splat_random.pm b/lib/WebGUI/i18n/English/Macro_Splat_random.pm index 61cca73fa..d4ec83789 100644 --- a/lib/WebGUI/i18n/English/Macro_Splat_random.pm +++ b/lib/WebGUI/i18n/English/Macro_Splat_random.pm @@ -16,10 +16,10 @@ our $I18N = { message => q|
^*; or ^*(); - Random Number
-A randomly generated number. This is often used on images (such as banner ads) that you want to ensure do not cache. In addition, you may configure this macro like this ^*(100); to create a random number between 0 and 100.
+A randomly generated, whole number between 0 and the number you send the Macro. This is often used on images (such as banner ads) that you want to ensure do not cache. You may configure this macro like this ^*(100); to create a random number between 0 and 100. If no number is sent a default of 1 billion (1,000,000,000) will be used.