diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-12-15 12:48:56 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-12-15 12:48:56 -0800 |
commit | 45c63f4d118bfc99924edb8685442035349af6db (patch) | |
tree | 995e248347743f905d7c8fc29343e88d74b31441 /modules/gallery/helpers/gallery_installer.php | |
parent | 6fb0eb4e97e3bbfa50029f0b4249c10bd22abe09 (diff) |
Use mt_rand() instead of rand() since it provides better portability.
Fixes #1527.
Diffstat (limited to 'modules/gallery/helpers/gallery_installer.php')
-rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index 3d82bc69..9c42caad 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -459,7 +459,7 @@ class gallery_installer { $blocks = block_manager::get_active($location); $new_blocks = array(); foreach ($blocks as $block) { - $new_blocks[rand()] = $block; + $new_blocks[mt_rand()] = $block; } block_manager::set_active($location, $new_blocks); } @@ -507,7 +507,7 @@ class gallery_installer { ->execute() as $row) { $new_slug = item::convert_filename_to_slug($row->slug); if (empty($new_slug)) { - $new_slug = rand(); + $new_slug = mt_rand(); } db::build() ->update("items") |