From 5713e3c66ed8bab3b86490d7b6e90f7947d53429 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 23 Dec 2008 04:36:09 +0000 Subject: Change photo::create() and album::create() to take ORM instances instead of ids. --- core/controllers/welcome.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/controllers') diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php index c9415c57..082dd390 100644 --- a/core/controllers/welcome.php +++ b/core/controllers/welcome.php @@ -201,7 +201,7 @@ class Welcome_Controller extends Template_Controller { $photo_count = 0; foreach (glob("$path/*.[Jj][Pp][Gg]") as $file) { set_time_limit(30); - photo::create($parent->id, $file, basename($file), basename($file)); + photo::create($parent, $file, basename($file), basename($file)); $photo_count++; } @@ -232,12 +232,12 @@ class Welcome_Controller extends Template_Controller { if ($type == "album") { $thumb_size = module::get_var("core", "thumb_size"); $parents[] = album::create( - $parent->id, "rnd_" . rand(), "Rnd $i", "random album $i", $owner_id) + $parent, "rnd_" . rand(), "Rnd $i", "random album $i", $owner_id) ->save(); $album_count++; } else { $photo_index = rand(0, count($test_images) - 1); - photo::create($parent->id, $test_images[$photo_index], basename($test_images[$photo_index]), + photo::create($parent, $test_images[$photo_index], basename($test_images[$photo_index]), "rnd_" . rand(), "sample thumb", $owner_id); $photo_count++; } -- cgit v1.2.3