aboutsummaryrefslogtreecommitdiff
path: root/classes/TidypicsAlbum.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-11-19 18:43:35 -0500
committercash <cash.costello@gmail.com>2011-11-19 18:43:35 -0500
commit98664daa72a390fe760b69116af8bfa9327826e3 (patch)
tree0c28594625cd810dcb2c22fc736191071c55b7fa /classes/TidypicsAlbum.php
parent4562cfbb1a630b14fd194271f99f1f8c098dc38d (diff)
downloadelgg-98664daa72a390fe760b69116af8bfa9327826e3.tar.gz
elgg-98664daa72a390fe760b69116af8bfa9327826e3.tar.bz2
album creation and editing is working
Diffstat (limited to 'classes/TidypicsAlbum.php')
-rw-r--r--classes/TidypicsAlbum.php30
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