diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-23 04:36:09 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-23 04:36:09 +0000 |
commit | 5713e3c66ed8bab3b86490d7b6e90f7947d53429 (patch) | |
tree | e6a4f5e93dd15406c655c7b51d455c5181d3334c /core/controllers/welcome.php | |
parent | 2502240ce4ad25e9fb60ee2468764e25346d2917 (diff) |
Change photo::create() and album::create() to take ORM instances
instead of ids.
Diffstat (limited to 'core/controllers/welcome.php')
-rw-r--r-- | core/controllers/welcome.php | 6 |
1 files changed, 3 insertions, 3 deletions
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++; } |