aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-03-21 18:50:27 +0000
committerCash Costello <cash.costello@gmail.com>2009-03-21 18:50:27 +0000
commit3b5ce30c7f4c2158f26c8ebb7e7bef3e19ece9e9 (patch)
treead397181660c293054d6eb2846cfbff06bd7fb1d /actions
parent7acd3a2947f7bd92ded5bc5f02baa5db87f6b212 (diff)
downloadelgg-3b5ce30c7f4c2158f26c8ebb7e7bef3e19ece9e9.tar.gz
elgg-3b5ce30c7f4c2158f26c8ebb7e7bef3e19ece9e9.tar.bz2
added river integration for 1.5 - did not add update album or create/update image
Diffstat (limited to 'actions')
-rw-r--r--actions/addalbum.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/actions/addalbum.php b/actions/addalbum.php
index f2d423abd..23fdfd22d 100644
--- a/actions/addalbum.php
+++ b/actions/addalbum.php
@@ -38,12 +38,12 @@
// Set its owner to the current user
$album->container_guid = $container_guid;
$album->owner_guid = $_SESSION['user']->getGUID();
- // For now, set its access to public (we'll add an access dropdown shortly)
$album->access_id = $access;
// Set its title and description appropriately
$album->title = $title;
$album->description = $body;
- // Before we can set metadata, we need to save the blog post
+
+ // Before we can set metadata, we need to save the album
if (!$album->save()) {
register_error(elgg_echo("album:error"));
forward(get_input('forward_url', $_SERVER['HTTP_REFERER'])); //failed, so forward to previous page
@@ -53,8 +53,14 @@
if (is_array($tagarray)) {
$album->tags = $tagarray;
}
+
+ // add to river (check to make sure we're running > Elgg 1.5 first)
+ if (function_exists('add_to_river'))
+ add_to_river('river/object/album/create', 'create', $album->owner_guid, $album->guid);
+
// Success message
system_message(elgg_echo("album:created"));
+
// Remove the album post cache
unset($_SESSION['albumtitle']);
unset($_SESSION['albumbody']);