From 71b4d8c3c3343455552a76756e5aaacd82034c4e Mon Sep 17 00:00:00 2001 From: Greg Froese Date: Fri, 9 Oct 2009 03:23:52 +0000 Subject: flickr integration updates --- pages/flickr/error_log | 1 + pages/flickr/importPhotosets.php | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'pages/flickr') diff --git a/pages/flickr/error_log b/pages/flickr/error_log index 716344052..a55ce1ae7 100644 --- a/pages/flickr/error_log +++ b/pages/flickr/error_log @@ -21,3 +21,4 @@ [06-Oct-2009 23:29:22] PHP Fatal error: Call to undefined function elgg_view_title() in /home/gfroese/public_html/mod/tidypics/pages/flickr/importPhotosets.php on line 9 [06-Oct-2009 23:30:08] WARNING: 2009-10-06 23:30:08 (PDT): "require_once(/home/gfroese/public_html/mod/tidypics/views/lib/flickr.php) [function.require-once]: failed to open stream: No such file or directory" in file /home/gfroese/public_html/mod/tidypics/views/default/tidypics/forms/setupFlickr.php (line 2) [06-Oct-2009 23:30:08] PHP Fatal error: require_once() [function.require]: Failed opening required '/home/gfroese/public_html/mod/tidypics/views/lib/flickr.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gfroese/public_html/mod/tidypics/views/default/tidypics/forms/setupFlickr.php on line 2 +[08-Oct-2009 20:05:02] PHP Parse error: syntax error, unexpected ')' in /home/gfroese/public_html/mod/tidypics/pages/flickr/importPhotosets.php on line 23 diff --git a/pages/flickr/importPhotosets.php b/pages/flickr/importPhotosets.php index c9b4416e4..fe241439e 100644 --- a/pages/flickr/importPhotosets.php +++ b/pages/flickr/importPhotosets.php @@ -18,6 +18,12 @@ $viewer = get_loggedin_user(); $flickr_username = get_metadata_byname( $viewer->guid, "flickr_username" ); $flickr_id = get_metadata_byname( $viewer->guid, "flickr_id" ); + $album_id = get_metadata_byname( $viewer->guid, "flickr_album_id" ); + + if( intval( $album_id->value ) <= 0 ) { + register_error( "No album selected. Please choose and save an album: $album_id->value" ); + forward( "/mod/tidypics/pages/flickr/setup.php" ); + } $photosets = $f->photosets_getList( $flickr_id->value ); foreach( $photosets["photoset"] as $photoset ) { @@ -29,7 +35,7 @@ //create links to import photos 10 at a time while( $photoset["photos"] > $count ) { $looper++; - $body .= " $looper"; + $body .= " $looper"; $count = $count + 10; } $body .= "
$photoset[photos] images"; -- cgit v1.2.3