Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Commit

Permalink
fix originalsecret on flickr image
Browse files Browse the repository at this point in the history
  • Loading branch information
alkcxy committed Jul 29, 2012
1 parent 65bd48a commit 67dab1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/flickrize/flickrizr.rb
Expand Up @@ -119,12 +119,14 @@ def method_missing(sym, *args, &block)
if sym.to_s.start_with? "url_"
url_suffix = sym.to_s.sub(/^url/,"")
format = "jpg"
secret = self.send(self.iop[:secret])
if sym.to_s.end_with? "_o"
format = self.send(self.iop[:originalformat])
secret = self.send(self.iop[:originalsecret])
elsif sym.to_s.end_with? "_"
url_suffix = ""
end
PHOTO_SOURCE_URL % [self.send(self.iop[:farm]), self.send(self.iop[:server]), self.send(self.iop[:flickr_id]), self.send(self.iop[:secret]), url_suffix, format]
PHOTO_SOURCE_URL % [self.send(self.iop[:farm]), self.send(self.iop[:server]), self.send(self.iop[:flickr_id]), secret, url_suffix, format]
else
super
end
Expand Down

0 comments on commit 67dab1a

Please sign in to comment.