summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-01-07 01:55:57 -0800
committerZach Copley <zach@status.net>2010-01-24 16:36:02 -0800
commit48e5f2b3c5164aa9e47289e5b243e2e1189b71ef (patch)
treead51926e5ad079da446ce1e0492a045b15e1b698 /classes
parent1e5b2a497e3c70e4af5f93e2326c93beed15fed1 (diff)
Add icons/icon upload to Oauth apps
Diffstat (limited to 'classes')
-rw-r--r--classes/Oauth_application.php13
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);
+ }
+
}