From 6cafc61f96e900790c8a1e3f0cd01b1b679e93b0 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 6 Nov 2008 05:51:20 +0000 Subject: album::set_thumbnail is now part of Item_Model so it can go. Fix a bug in the scaffolding where we weren't saving the album after adding its thumbnail (so its dimensions weren't getting set). --- core/helpers/album.php | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'core/helpers') diff --git a/core/helpers/album.php b/core/helpers/album.php index 6934932e..021c09f3 100644 --- a/core/helpers/album.php +++ b/core/helpers/album.php @@ -54,17 +54,4 @@ class Album_Core { } return $album; } - - static function set_thumbnail($id, $filename) { - $album = ORM::factory("item", $id); - - /** @todo: parameterize these dimensions */ - $image = Image::factory($filename); - $image->resize(200, 140, Image::WIDTH)->save($album->thumbnail_path()); - - $dims = getimagesize($album->thumbnail_path()); - $album->thumbnail_width = $dims[0]; - $album->thumbnail_height = $dims[1]; - return $album->save(); - } } -- cgit v1.2.3