diff options
author | Zach Copley <zach@status.net> | 2010-01-07 01:55:57 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-01-14 02:41:05 +0000 |
commit | b14a97f5f95e809c6b5bffa6dab8eba06509a3dc (patch) | |
tree | a82579a806023aeab035639e54edd9861f0f38cc /classes | |
parent | 4c5ddc42c10f2c8509e2a38e3fb18a69e021213a (diff) |
Add icons/icon upload to Oauth apps
Diffstat (limited to 'classes')
-rw-r--r-- | classes/Oauth_application.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/classes/Oauth_application.php b/classes/Oauth_application.php index ef1bbf6d9..d4de6d82e 100644 --- a/classes/Oauth_application.php +++ b/classes/Oauth_application.php @@ -75,4 +75,17 @@ class Oauth_application extends Memcached_DataObject } } + function setOriginal($filename) + { + $imagefile = new ImageFile($this->id, Avatar::path($filename)); + + // XXX: Do we want to have a bunch of different size icons? homepage, stream, mini? + // or just one and control size via CSS? --Zach + + $orig = clone($this); + $this->icon = Avatar::url($filename); + common_debug(common_log_objstring($this)); + return $this->update($orig); + } + } |