From 581e931c439a726fbd6a0b0068debd2cd76e349d Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 5 Nov 2008 07:13:46 +0000 Subject: Change the default theme to actually render what's in the Gallery. Currently only the album view works, albums have no thumbnails, and there's only 1 image in use. Improved Item_Model to have the following API methods file_path() -- returns the path to the source image or album dir thumbnail_path(), thumbnail_url() -- returns path/url to the thumbnail resize_path(), resize_url() -- returns path/url to the resize All tests updated. --- core/helpers/album.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'core/helpers/album.php') diff --git a/core/helpers/album.php b/core/helpers/album.php index 415e654c..021c09f3 100644 --- a/core/helpers/album.php +++ b/core/helpers/album.php @@ -47,8 +47,11 @@ class Album_Core { } $album = $album->add_to_parent($parent_id); - mkdir($album->path()); - mkdir($album->thumbnail_path()); + mkdir($album->file_path()); + $thumbnail_dir = dirname($album->thumbnail_path()); + if (!file_exists($thumbnail_dir)) { + mkdir($thumbnail_dir); + } return $album; } } -- cgit v1.2.3