取消黑河专题jiathis的注释,解决重复访问登录页面时的死循环问题,修改验证码图片存放路径
This commit is contained in:
parent
9a78f04113
commit
1c6a36d638
|
@ -301,20 +301,17 @@ class AccountController extends Zend_Controller_Action
|
||||||
$auth = Zend_Auth::getInstance();
|
$auth = Zend_Auth::getInstance();
|
||||||
if ($auth->hasIdentity())
|
if ($auth->hasIdentity())
|
||||||
{
|
{
|
||||||
view::Post($this,"您已经登录,无需重复登录",-1);
|
view::Post($this,"您已经登录,无需重复登录","/index");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tohref = $this->_request->getParam('href');
|
$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'];
|
$this->view->href = $_SERVER['REQUEST_URI'];
|
||||||
}
|
}else{
|
||||||
|
$this->view->href = "/";
|
||||||
if($tohref == "/account/login")
|
|
||||||
{
|
|
||||||
$this->view->href = $tohref = "/";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($tohref))
|
if(!empty($tohref))
|
||||||
|
|
|
@ -479,7 +479,7 @@ endforeach;
|
||||||
<a class="jiathis_counter_style"></a>
|
<a class="jiathis_counter_style"></a>
|
||||||
</div>
|
</div>
|
||||||
<!-- JiaThis Button END -->
|
<!-- JiaThis Button END -->
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="/js/metadata-view.js"></script>
|
<script src="/js/metadata-view.js"></script>
|
||||||
|
@ -554,4 +554,4 @@ var bound = {
|
||||||
<p>没有找到对应的元数据。</p>
|
<p>没有找到对应的元数据。</p>
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
</div>
|
</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;
|
public $captcha;
|
||||||
|
|
||||||
private $sessionName = "captcha";
|
private $sessionName = "captcha";
|
||||||
|
private $imgDir = "images/captcha";
|
||||||
|
|
||||||
function __construct($db = NULL)
|
function __construct($db = NULL)
|
||||||
{
|
{
|
||||||
|
@ -24,12 +25,17 @@ class Captcha extends \Zend_Controller_Plugin_Abstract
|
||||||
'lineNoiseLevel'=>1,
|
'lineNoiseLevel'=>1,
|
||||||
'timeout' => 300,
|
'timeout' => 300,
|
||||||
'font' => '../data/fonts/ggbi.ttf',
|
'font' => '../data/fonts/ggbi.ttf',
|
||||||
'imgDir' => 'vdimg/',
|
'imgDir' => $this->imgDir,
|
||||||
'imgUrl' => '/vdimg',
|
'imgUrl' => '/images/captcha',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCaptcha(){
|
public function setCaptcha(){
|
||||||
|
if(!is_dir($this->imgDir))
|
||||||
|
{
|
||||||
|
mkdir($this->imgDir);
|
||||||
|
}
|
||||||
|
|
||||||
$this->captcha->generate();
|
$this->captcha->generate();
|
||||||
$_SESSION[$this->sessionName] = $this->captcha->getWord();
|
$_SESSION[$this->sessionName] = $this->captcha->getWord();
|
||||||
$url = $this->captcha->getImgUrl()
|
$url = $this->captcha->getImgUrl()
|
||||||
|
|
Loading…
Reference in New Issue