Add icons/icon upload to Oauth apps

This commit is contained in:
Zach Copley
2010-01-07 01:55:57 -08:00
parent 4c5ddc42c1
commit b14a97f5f9
6 changed files with 193 additions and 57 deletions

View File

@@ -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);
}
}