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
|
|
@ -13,7 +13,7 @@
|
|||
- added: Delete columns from DataTable
|
||||
- fixed: Now more than one DataTable can be put on a page
|
||||
- fixed #9002: add a variant in admin product view misses i18n link
|
||||
|
||||
- fixed #9034: Removed all instances of srand. This is called implicitily by rand and be dangerous if called mulitple times by the same process.
|
||||
7.6.2
|
||||
- fixed: not allowed to add calendar events if in can edit group but not can add event group
|
||||
- sped up lineage changes significantly
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ sub createSurveyOrder{
|
|||
my $self = shift;
|
||||
my $order;
|
||||
my $qstarting = 0;
|
||||
|
||||
$self->log('wtf am I faling for');
|
||||
for(my $s = 0; $s <= $#{$self->survey->sections()}; $s++){
|
||||
#create question order for section
|
||||
my @qorder;
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ A reference to the current session.
|
|||
sub new {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
srand;
|
||||
bless {_session=>$session}, $class;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ sub addFileFromCaptcha {
|
|||
my $self = shift;
|
||||
my $error = "";
|
||||
my $challenge;
|
||||
srand;
|
||||
$challenge.= ('A'..'Z')[rand(26)] foreach (1..6);
|
||||
my $filename = "captcha.".$self->session->id->generate().".gif";
|
||||
my $image = $graphicsPackage->new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue