Removed all instances of srand. This is called implicitily by rand and be dangerous if called mulitple times by the same process.
This commit is contained in:
parent
3af1b41542
commit
70a0a422b7
6 changed files with 2 additions and 7 deletions
|
|
@ -41,7 +41,6 @@ sub process {
|
|||
if (defined $asset) {
|
||||
my $children = $asset->getLineage(["children"]);
|
||||
#randomize;
|
||||
srand;
|
||||
my $randomAssetId = $children->[rand(scalar(@{$children}))];
|
||||
my $randomAsset = WebGUI::Asset->newByDynamicClass($session,$randomAssetId);
|
||||
if (defined $randomAsset) {
|
||||
|
|
|
|||
|
|
@ -60,8 +60,6 @@ URL of the template to use to display the random thread. Must be a valid URL wit
|
|||
sub process {
|
||||
my $session = shift;
|
||||
my ($startURL, $relatives, $templateURL) = @_;
|
||||
# Seed the randomizer:
|
||||
srand;
|
||||
|
||||
# Set defaults (default template is set by id later):
|
||||
$startURL ||= 'home';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue