Sometimes there are duplicate images if I use the "Flickr random photos" block...
Probably the same photo was selected randomly twice.

CommentFileSizeAuthor
#4 paul.booker.205391.patch753 bytesAnonymous (not verified)
#1 flickr_block_duplicate.patch1001 bytesbpocanada
flickr_block.PNG127.01 KBbiagio3d

Comments

bpocanada’s picture

StatusFileSize
new1001 bytes

Here is a patch for duplicate photos in random block.

andrewlevine’s picture

Priority: Critical » Normal
Status: Needs work » Reviewed & tested by the community

looks good to me. couldn't test because this functionality isn't supported by the flickr api anymore. Get the error "Flickr error 3: Parameterless searches have been disabled. Please use flickr.photos.getRecent instead." I will open a separate ticket for that though.

Let's get this committed though.

drewish’s picture

Status: Reviewed & tested by the community » Needs work

i don't think this is correct. the $index that's being used to find duplicates is per page and select from multiple pages. i think the correct key for the array would be the photo's id.

Anonymous’s picture

Version: 5.x-1.1 » 6.x-1.x-dev
Assigned: Unassigned »
Status: Needs work » Needs review
StatusFileSize
new753 bytes

Please let me know how you get on with this patch .

Thanks, Paul

Anonymous’s picture

Status: Needs review » Closed (fixed)

Commited the changes.

I accidentally hit the submit button while writing the commit message,
sorry about that.

Best, Paul