aboutsummaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-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