From da97ac566cb06a583bd8b84b9e1275e37ea0a3ca Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Mon, 09 Oct 2006 19:02:55 +0000 Subject: incomplete workaround for absense of owner information in Photo when generating url git-svn-id: http://svn.klever.net/kin/fireflix/trunk@188 fe716a7a-6dde-0310-88d9-d003556173a8 --- diff --git a/content/flickr.js b/content/flickr.js index b5bfa43..75d1a72 100644 --- a/content/flickr.js +++ b/content/flickr.js @@ -255,9 +255,14 @@ Flickr.prototype = { ); }, get_photo_page_url: function(p) { - if(p instanceof Photo) // TODO: half wrong, what if no owner? - return this.photos_url + (p.owner.nsid?p.owner.nsid:this.user.nsid) + '/' + p.id; - else // TODO: take owner into account? + if(p instanceof Photo) { + // TODO: track photoset and user owner id from there? + // The approach below is sheerly wrong. + var o = this.user.nsid; + if(p.owner && p.owner.nsid) o = p.owner.nsid; + var rv = this.photos_url + o +'/' + p.id; + return rv; + }else // TODO: take owner into account? return this.photos_url + this.user.nsid + '/' + p; }, make_photo_url: function(p,sfx) { -- cgit v0.9.0.2