aboutsummaryrefslogtreecommitdiff
path: root/actions/flickrSetup.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/flickrSetup.php')
-rw-r--r--actions/flickrSetup.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/actions/flickrSetup.php b/actions/flickrSetup.php
index e272ee141..2a1f82315 100644
--- a/actions/flickrSetup.php
+++ b/actions/flickrSetup.php
@@ -6,6 +6,7 @@ require_once dirname(dirname(__FILE__)) . "/lib/phpFlickr/phpFlickr.php";
$f = new phpFlickr("26b2abba37182aca62fe0eb2c7782050");
$flickr_username = get_input( "flickr_username" );
+$album_id = get_input( "album_id" );
$return_url = get_input( "return_url" );
$user = get_loggedin_user();
@@ -18,9 +19,14 @@ if( empty( $flickr_username )) {
if( !empty( $flickr_user["id"] )) {
create_metadata( $user->guid, "flickr_username", $flickr_username, "text", $user->guid, ACCESS_PUBLIC );
create_metadata( $user->guid, "flickr_id", $flickr_user["id"], "text", $user->guid, ACCESS_PUBLIC );
+ if( $album_id ) {
+ create_metadata( $user->guid, "flickr_album_id", $album_id, "text", $user->guid, ACCESS_PUBLIC );
+ $album = get_entity( $album_id );
+ }
system_message( "Successfully saved Flickr username of $flickr_username" );
system_message( "flickr user id: $flickr_user[id]" );
+ system_message( "Album saved - $album->title" );
} else {
register_error( "Username $flickr_username not found on Flickr" );
}