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/photo.php | 1 + 1 file changed, 1 insertion(+) (limited to 'core/helpers/photo.php') 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