From 6b5d395d593fb9887cd15e37a0c10ee8334935b6 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 18 Mar 2009 19:39:34 +0000 Subject: 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. --- core/helpers/movie.php | 1 + core/helpers/photo.php | 1 + 2 files changed, 2 insertions(+) (limited to 'core/helpers') 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 -- cgit v1.2.3