取消黑河专题jiathis的注释,解决重复访问登录页面时的死循环问题,修改验证码图片存放路径
This commit is contained in:
parent
9a78f04113
commit
1c6a36d638
|
@ -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))
|
||||
|
|
|
@ -479,7 +479,7 @@ endforeach;
|
|||
<a class="jiathis_counter_style"></a>
|
||||
</div>
|
||||
<!-- JiaThis Button END -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="/js/metadata-view.js"></script>
|
||||
|
@ -554,4 +554,4 @@ var bound = {
|
|||
<p>没有找到对应的元数据。</p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!--<script type="text/javascript" src="http://v3.jiathis.com/code_mini/jia.js?uid=1336100079460458" charset="utf-8"></script>-->
|
||||
<script type="text/javascript" src="http://v3.jiathis.com/code_mini/jia.js?uid=1336100079460458" charset="utf-8"></script>
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue