summaryrefslogtreecommitdiff
path: root/_darcs/pristine/classes
diff options
context:
space:
mode:
Diffstat (limited to '_darcs/pristine/classes')
-rw-r--r--_darcs/pristine/classes/Avatar.php34
-rw-r--r--_darcs/pristine/classes/Profile.php19
2 files changed, 25 insertions, 28 deletions
diff --git a/_darcs/pristine/classes/Avatar.php b/_darcs/pristine/classes/Avatar.php
index 3c754ec2d..4fdb99d35 100644
--- a/_darcs/pristine/classes/Avatar.php
+++ b/_darcs/pristine/classes/Avatar.php
@@ -79,22 +79,20 @@ class Avatar extends Memcached_DataObject
}
}
- function to_image()
- {
- $filepath = common_avatar_path($this->filename);
- if ($this->mediatype == 'image/gif') {
- return imagecreatefromgif($filepath);
- } else if ($this->mediatype == 'image/jpeg') {
- return imagecreatefromjpeg($filepath);
- } else if ($this->mediatype == 'image/png') {
- return imagecreatefrompng($filepath);
- } else {
- return null;
- }
- }
-
- function &pkeyGet($kv)
- {
- return Memcached_DataObject::pkeyGet('Avatar', $kv);
- }
+ function to_image() {
+ $filepath = common_avatar_path($this->filename);
+ if ($this->mediatype == 'image/gif') {
+ return imagecreatefromgif($filepath);
+ } else if ($this->mediatype == 'image/jpeg') {
+ return imagecreatefromjpeg($filepath);
+ } else if ($this->mediatype == 'image/png') {
+ return imagecreatefrompng($filepath);
+ } else {
+ return NULL;
+ }
+ }
+
+ function &pkeyGet($kv) {
+ return Memcached_DataObject::pkeyGet('Avatar', $kv);
+ }
}
diff --git a/_darcs/pristine/classes/Profile.php b/_darcs/pristine/classes/Profile.php
index fb6ff90f1..3b6ac1d7f 100644
--- a/_darcs/pristine/classes/Profile.php
+++ b/_darcs/pristine/classes/Profile.php
@@ -121,16 +121,15 @@ class Profile extends Memcached_DataObject
return $avatar;
}
- function delete_avatars()
- {
- $avatar = new Avatar();
- $avatar->profile_id = $this->id;
- $avatar->find();
- while ($avatar->fetch()) {
- $avatar->delete();
- }
- return true;
- }
+ function delete_avatars() {
+ $avatar = new Avatar();
+ $avatar->profile_id = $this->id;
+ $avatar->find();
+ while ($avatar->fetch()) {
+ $avatar->delete();
+ }
+ return true;
+ }
function getBestName()
{