Bug fix for data.photoset.owner null #85

Merged
merged 2 commits into from Jun 22, 2012
@@ -167,7 +167,7 @@
//create image urls
var photoURL = 'http://farm' + item.farm + '.static.flickr.com/' + item.server + '/' + item.id + '_' + item.secret + '_' + options.image_size + '.jpg';
var thumbURL = 'http://farm' + item.farm + '.static.flickr.com/' + item.server + '/' + item.id + '_' + item.secret + '_t.jpg';
- var photoLink = "http://www.flickr.com/photos/" + data.photoset.owner + "/" + item.id + "/";
+ var photoLink = "http://www.flickr.com/photos/" + (data.photoset ? data.photoset.owner : item.owner) + "/" + item.id + "/";
if (i == 0){
options.slides.splice(0,1,{ image : photoURL, thumb : thumbURL, title : item.title , url : photoLink });
@@ -560,7 +560,7 @@
if ((browserheight/browserwidth) > ratio){
options.fit_landscape && ratio <= 1 ? resizeWidth() : resizeHeight(); //If landscapes are set to fit
} else {
- options.fit_portrait && ratio > 1 ? resizeHeight() : resizeWidth(); //If portraits are set to fit
+ options.fit_portrait && ratio >= 1 ? resizeHeight() : resizeWidth(); //If portraits are set to fit
}
}