diff --git a/application/default/controllers/AccountController.php b/application/default/controllers/AccountController.php index 72e52f23..762f3597 100755 --- a/application/default/controllers/AccountController.php +++ b/application/default/controllers/AccountController.php @@ -301,20 +301,17 @@ class AccountController extends Zend_Controller_Action $auth = Zend_Auth::getInstance(); if ($auth->hasIdentity()) { - view::Post($this,"您已经登录,无需重复登录",-1); + view::Post($this,"您已经登录,无需重复登录","/index"); return true; } $tohref = $this->_request->getParam('href'); - if(($options['module']=="default" && $options['controller'] == "account" && $options['action'] == "login")) + if($_SERVER['REQUEST_URI'] !== "/account/login") { $this->view->href = $_SERVER['REQUEST_URI']; - } - - if($tohref == "/account/login") - { - $this->view->href = $tohref = "/"; + }else{ + $this->view->href = "/"; } if(!empty($tohref)) diff --git a/application/default/views/scripts/heihe/view.phtml b/application/default/views/scripts/heihe/view.phtml index ba55b71c..f5a5b84a 100755 --- a/application/default/views/scripts/heihe/view.phtml +++ b/application/default/views/scripts/heihe/view.phtml @@ -479,7 +479,7 @@ endforeach; - + @@ -554,4 +554,4 @@ var bound = {

没有找到对应的元数据。

- \ No newline at end of file + \ No newline at end of file diff --git a/application/module/Helpers/Captcha.php b/application/module/Helpers/Captcha.php index dc61b759..43a835b3 100644 --- a/application/module/Helpers/Captcha.php +++ b/application/module/Helpers/Captcha.php @@ -6,6 +6,7 @@ class Captcha extends \Zend_Controller_Plugin_Abstract public $captcha; private $sessionName = "captcha"; + private $imgDir = "images/captcha"; function __construct($db = NULL) { @@ -23,13 +24,18 @@ class Captcha extends \Zend_Controller_Plugin_Abstract 'dotNoiseLevel'=>2, 'lineNoiseLevel'=>1, 'timeout' => 300, - 'font' => '../data/fonts/ggbi.ttf', - 'imgDir' => 'vdimg/', - 'imgUrl' => '/vdimg', + 'font' => '../data/fonts/ggbi.ttf', + 'imgDir' => $this->imgDir, + 'imgUrl' => '/images/captcha', )); } public function setCaptcha(){ + if(!is_dir($this->imgDir)) + { + mkdir($this->imgDir); + } + $this->captcha->generate(); $_SESSION[$this->sessionName] = $this->captcha->getWord(); $url = $this->captcha->getImgUrl()