summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/helpers/album.php1
-rw-r--r--modules/gallery/helpers/movie.php1
-rw-r--r--modules/gallery/helpers/photo.php1
-rw-r--r--modules/gallery/models/item.php1
4 files changed, 1 insertions, 3 deletions
diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php
index 477f1945..52759414 100644
--- a/modules/gallery/helpers/album.php
+++ b/modules/gallery/helpers/album.php
@@ -61,7 +61,6 @@ class album_Core {
$album->thumb_dirty = 1;
$album->resize_dirty = 1;
$album->slug = $slug;
- $album->rand_key = ((float)mt_rand()) / (float)mt_getrandmax();
$album->sort_column = "created";
$album->sort_order = "ASC";
diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php
index 01859924..b0d24f68 100644
--- a/modules/gallery/helpers/movie.php
+++ b/modules/gallery/helpers/movie.php
@@ -85,7 +85,6 @@ class movie_Core {
$movie->resize_dirty = 1;
$movie->sort_column = "weight";
$movie->slug = $slug;
- $movie->rand_key = ((float)mt_rand()) / (float)mt_getrandmax();
// Randomize the name if there's a conflict
// @todo Improve this. Random numbers are not user friendly
diff --git a/modules/gallery/helpers/photo.php b/modules/gallery/helpers/photo.php
index 4e20e610..aeae7f56 100644
--- a/modules/gallery/helpers/photo.php
+++ b/modules/gallery/helpers/photo.php
@@ -84,7 +84,6 @@ class photo_Core {
$photo->resize_dirty = 1;
$photo->sort_column = "weight";
$photo->slug = $slug;
- $photo->rand_key = ((float)mt_rand()) / (float)mt_getrandmax();
// Randomize the name or slug if there's a conflict
// @todo Improve this. Random numbers are not user friendly
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index 9edc65ce..33b36ff1 100644
--- a/modules/gallery/models/item.php
+++ b/modules/gallery/models/item.php
@@ -368,6 +368,7 @@ class Item_Model extends ORM_MPTT {
if (!$this->loaded()) {
$this->created = $this->updated;
$this->weight = item::get_max_weight();
+ $this->rand_key = ((float)mt_rand()) / (float)mt_getrandmax();
} else {
$send_event = 1;