diff options
author | Zach Copley <zach@status.net> | 2010-01-07 01:55:57 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-01-24 16:36:02 -0800 |
commit | 48e5f2b3c5164aa9e47289e5b243e2e1189b71ef (patch) | |
tree | ad51926e5ad079da446ce1e0492a045b15e1b698 /classes/Oauth_application.php | |
parent | 1e5b2a497e3c70e4af5f93e2326c93beed15fed1 (diff) |
Add icons/icon upload to Oauth apps
Diffstat (limited to 'classes/Oauth_application.php')
-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); + } + } |