diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-18 19:39:34 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-18 19:39:34 +0000 |
commit | 6b5d395d593fb9887cd15e37a0c10ee8334935b6 (patch) | |
tree | 739fb2debda020f4e65a0a373579a08602083be8 | |
parent | 4da37ecb235bc1b403b7ade6b273bc68c306d261 (diff) |
Fix for ticket #153. The sort column was not not initialized for
movies or photos. Turns out that when you go to delete, ORM tries to
check for children and apply the sort order.
-rw-r--r-- | core/helpers/movie.php | 1 | ||||
-rw-r--r-- | core/helpers/photo.php | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/core/helpers/movie.php b/core/helpers/movie.php index b964e383..59258dd9 100644 --- a/core/helpers/movie.php +++ b/core/helpers/movie.php @@ -63,6 +63,7 @@ class movie_Core { $movie->mime_type = strtolower($pi["extension"]) == "mp4" ? "video/mp4" : "video/x-flv"; $movie->thumb_dirty = 1; $movie->resize_dirty = 1; + $movie->sort_column = "id"; $movie->rand_key = ((float)mt_rand()) / (float)mt_getrandmax(); // Randomize the name if there's a conflict diff --git a/core/helpers/photo.php b/core/helpers/photo.php index c98af2f9..72e43419 100644 --- a/core/helpers/photo.php +++ b/core/helpers/photo.php @@ -63,6 +63,7 @@ class photo_Core { $photo->mime_type = empty($image_info['mime']) ? "application/unknown" : $image_info['mime']; $photo->thumb_dirty = 1; $photo->resize_dirty = 1; + $photo->sort_column = "id"; $photo->rand_key = ((float)mt_rand()) / (float)mt_getrandmax(); // Randomize the name if there's a conflict |