Commit 15c2a2ee by Qiang Xue

Removed unneeded code.

parent 2d8a465c
...@@ -260,10 +260,6 @@ class CaptchaAction extends Action ...@@ -260,10 +260,6 @@ class CaptchaAction extends Action
(int)($this->foreColor % 0x10000 / 0x100), (int)($this->foreColor % 0x10000 / 0x100),
$this->foreColor % 0x100); $this->foreColor % 0x100);
if ($this->fontFile === null) {
$this->fontFile = dirname(__FILE__) . '/SpicyRice.ttf';
}
$length = strlen($code); $length = strlen($code);
$box = imagettfbbox(30, 0, $this->fontFile, $code); $box = imagettfbbox(30, 0, $this->fontFile, $code);
$w = $box[4] - $box[0] + $this->offset * ($length - 1); $w = $box[4] - $box[0] + $this->offset * ($length - 1);
...@@ -302,10 +298,6 @@ class CaptchaAction extends Action ...@@ -302,10 +298,6 @@ class CaptchaAction extends Action
$image = new \Imagick(); $image = new \Imagick();
$image->newImage($this->width, $this->height, $backColor); $image->newImage($this->width, $this->height, $backColor);
if ($this->fontFile === null) {
$this->fontFile = dirname(__FILE__) . '/SpicyRice.ttf';
}
$draw = new \ImagickDraw(); $draw = new \ImagickDraw();
$draw->setFont($this->fontFile); $draw->setFont($this->fontFile);
$draw->setFontSize(30); $draw->setFontSize(30);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment