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:
Kaleb Murphy 2008-11-10 21:53:30 +00:00
parent 3af1b41542
commit 70a0a422b7
6 changed files with 2 additions and 7 deletions

View file

@ -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) {

View file

@ -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';