Permalink
Browse files

Merge branch 'master' of github.com:spadin/avatar

  • Loading branch information...
2 parents a70a230 + d497d5d commit d95200a38013d20e7222237b52c5d83f1acfa98f @spadin committed Mar 5, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 controllers/avatar.php
@@ -4,8 +4,8 @@
Loader::library('phpthumb/ThumbLib.inc', 'avatar');
class AvatarController extends Controller {
- protected $width, $height, $user, $format, $content_type, $ui;
- protected $originalAvatar, $newAvatar;
+ protected $width, $height, $user, $format, $content_type;
+ protected $ui, $originalAvatar, $newAvatar;
public function view($param1, $param2 = null) {
$this->setContentType("text/plain");
@@ -69,7 +69,7 @@ protected function setProperties($param1, $param2) {
$this->content_type = "image/png";
break;
case "gif":
- $this->content_tyep = "image/gif";
+ $this->content_type = "image/gif";
break;
default:
$this->content_type = "image/jpeg";
@@ -100,7 +100,6 @@ protected function setImageFileProperties() {
$avatarImagePath = DIR_BASE . $avatarImagePath;
}
$this->originalAvatar = $avatarImagePath;
-
$filename = md5(DIR_BASE .':'. $this->user .':'. $this->width .':'. $this->height .':'. filemtime($this->originalAvatar)) . '.' . $this->format;
$filename = DIR_BASE ."/files/cache/". $filename;
$this->newAvatar = $filename;

0 comments on commit d95200a

Please sign in to comment.