diff options
| author | cash <cash.costello@gmail.com> | 2011-11-19 18:43:35 -0500 |
|---|---|---|
| committer | cash <cash.costello@gmail.com> | 2011-11-19 18:43:35 -0500 |
| commit | 98664daa72a390fe760b69116af8bfa9327826e3 (patch) | |
| tree | 0c28594625cd810dcb2c22fc736191071c55b7fa /classes | |
| parent | 4562cfbb1a630b14fd194271f99f1f8c098dc38d (diff) | |
| download | elgg-98664daa72a390fe760b69116af8bfa9327826e3.tar.gz elgg-98664daa72a390fe760b69116af8bfa9327826e3.tar.bz2 | |
album creation and editing is working
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/TidypicsAlbum.php | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/classes/TidypicsAlbum.php b/classes/TidypicsAlbum.php index 1fbdb8ad8..75a018410 100644 --- a/classes/TidypicsAlbum.php +++ b/classes/TidypicsAlbum.php @@ -18,12 +18,23 @@ class TidypicsAlbum extends ElggObject { } /** - * Get the title of the photo album - * - * @return string + * Save an album + * + * @return bool */ - public function getTitle() { - return $this->title; + public function save() { + + if (!isset($this->new_album)) { + $this->new_album = true; + } + + if (!parent::save()) { + return false; + } + + mkdir(tp_get_img_dir() . $this->guid, 0755, true); + + return true; } /** @@ -40,6 +51,15 @@ class TidypicsAlbum extends ElggObject { } /** + * Get the title of the photo album + * + * @return string + */ + public function getTitle() { + return $this->title; + } + + /** * Get an array of image objects * * @param int $limit |
