From 15c2a2eed996aa168f25bfd5187a07ec94df1d55 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 14 May 2013 07:32:42 -0400 Subject: [PATCH] Removed unneeded code. --- yii/web/CaptchaAction.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/yii/web/CaptchaAction.php b/yii/web/CaptchaAction.php index e3d6eaa..cff2314 100644 --- a/yii/web/CaptchaAction.php +++ b/yii/web/CaptchaAction.php @@ -260,10 +260,6 @@ class CaptchaAction extends Action (int)($this->foreColor % 0x10000 / 0x100), $this->foreColor % 0x100); - if ($this->fontFile === null) { - $this->fontFile = dirname(__FILE__) . '/SpicyRice.ttf'; - } - $length = strlen($code); $box = imagettfbbox(30, 0, $this->fontFile, $code); $w = $box[4] - $box[0] + $this->offset * ($length - 1); @@ -302,10 +298,6 @@ class CaptchaAction extends Action $image = new \Imagick(); $image->newImage($this->width, $this->height, $backColor); - if ($this->fontFile === null) { - $this->fontFile = dirname(__FILE__) . '/SpicyRice.ttf'; - } - $draw = new \ImagickDraw(); $draw->setFont($this->fontFile); $draw->setFontSize(30);