summaryrefslogtreecommitdiffabout
path: root/content
authorMichael Krelin <hacker@klever.net>2006-10-09 19:02:55 (UTC)
committer Michael Krelin <hacker@klever.net>2006-10-09 19:02:55 (UTC)
commitda97ac566cb06a583bd8b84b9e1275e37ea0a3ca (patch) (unidiff)
tree14bad35b9e44ad58719d9704e89569bb9e842f09 /content
parentb427de69c7df035643b95f9e2b1ed31276765065 (diff)
downloadfireflix-da97ac566cb06a583bd8b84b9e1275e37ea0a3ca.zip
fireflix-da97ac566cb06a583bd8b84b9e1275e37ea0a3ca.tar.gz
fireflix-da97ac566cb06a583bd8b84b9e1275e37ea0a3ca.tar.bz2
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
Diffstat (limited to 'content') (more/less context) (ignore whitespace changes)
-rw-r--r--content/flickr.js11
1 files changed, 8 insertions, 3 deletions
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 = {
255 ); 255 );
256 }, 256 },
257 get_photo_page_url: function(p) { 257 get_photo_page_url: function(p) {
258 if(p instanceof Photo) // TODO: half wrong, what if no owner? 258 if(p instanceof Photo) {
259 return this.photos_url + (p.owner.nsid?p.owner.nsid:this.user.nsid) + '/' + p.id; 259 // TODO: track photoset and user owner id from there?
260 else // TODO: take owner into account? 260 // The approach below is sheerly wrong.
261 var o = this.user.nsid;
262 if(p.owner && p.owner.nsid) o = p.owner.nsid;
263 var rv = this.photos_url + o +'/' + p.id;
264 return rv;
265 }else // TODO: take owner into account?
261 return this.photos_url + this.user.nsid + '/' + p; 266 return this.photos_url + this.user.nsid + '/' + p;
262 }, 267 },
263 make_photo_url: function(p,sfx) { 268 make_photo_url: function(p,sfx) {