Browse Source

Removed unneeded code.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
15c2a2eed9
  1. 8
      yii/web/CaptchaAction.php

8
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);

Loading…
Cancel
Save