diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2008-10-02 10:47:49 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2008-10-02 10:47:49 -0400 |
commit | c8392ed58d8c352b9dd68f23d140f96d9520c5fc (patch) | |
tree | 2c115e3b95410815ace1efaee421a219038c0b08 /classes/Profile.php | |
parent | 2f71f4d95ac87d338499e50a2535c289b471901f (diff) |
use pkeyGet for Avatar
darcs-hash:20081002144749-5ed1f-a5503625b811f28a853712d4ddd4a76813f24bc1.gz
Diffstat (limited to 'classes/Profile.php')
-rw-r--r-- | classes/Profile.php | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/classes/Profile.php b/classes/Profile.php index 1dffbd573..a37821e1b 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -47,19 +47,12 @@ class Profile extends Memcached_DataObject ###END_AUTOCODE function getAvatar($width, $height=NULL) { - $avatar = DB_DataObject::factory('avatar'); - $avatar->profile_id = $this->id; - $avatar->width = $width; if (is_null($height)) { - $avatar->height = $width; - } else { - $avatar->height = $height; - } - if ($avatar->find(true)) { - return $avatar; - } else { - return NULL; + $height = $width; } + return Avatar::pkeyGet(array('profile_id' => $this->id, + 'width' => $width, + 'height' => $height)); } function getOriginalAvatar() { |