From 3b5ce30c7f4c2158f26c8ebb7e7bef3e19ece9e9 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 21 Mar 2009 18:50:27 +0000 Subject: added river integration for 1.5 - did not add update album or create/update image --- actions/addalbum.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'actions/addalbum.php') 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']); -- cgit v1.2.3