diff options
Diffstat (limited to 'core/helpers')
-rw-r--r-- | core/helpers/album.php | 7 | ||||
-rw-r--r-- | core/helpers/core_installer.php | 4 | ||||
-rw-r--r-- | core/helpers/photo.php | 2 |
3 files changed, 8 insertions, 5 deletions
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; } } diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index 8511b840..7d83236a 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -54,7 +54,7 @@ class core_installer { KEY `type` (`type`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - foreach (array("albums", "thumbnails") as $dir) { + foreach (array("albums", "resizes") as $dir) { @mkdir(VARPATH . $dir); } @@ -80,6 +80,6 @@ class core_installer { $db->query("DROP TABLE IF EXISTS `items`;"); $db->query("DROP TABLE IF EXISTS `modules`;"); system("/bin/rm -rf " . VARPATH . "albums"); - system("/bin/rm -rf " . VARPATH . "thumbnails"); + system("/bin/rm -rf " . VARPATH . "resizes"); } } diff --git a/core/helpers/photo.php b/core/helpers/photo.php index e796ef03..dfa67e2b 100644 --- a/core/helpers/photo.php +++ b/core/helpers/photo.php @@ -54,7 +54,7 @@ class Photo_Core { $photo->add_to_parent($parent_id); - copy($filename, $photo->path()); + copy($filename, $photo->file_path()); /** @todo: parameterize these values */ $image = Image::factory($filename); |