fix merge error
This commit is contained in:
parent
eed2a9dec0
commit
5874a40e38
|
@ -1212,20 +1212,22 @@ class ServiceController extends Zend_Controller_Action
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
echo $pagnation;
|
echo $pagnation;
|
||||||
}//文档页面相关数据
|
}//文档页面相关数据
|
||||||
function geonetwork()
|
function geonetworkAction()
|
||||||
{
|
{
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
$this->_helper->layout->disableLayout();
|
$this->_helper->layout->disableLayout();
|
||||||
$auth = Zend_Auth::getInstance();
|
$auth = Zend_Auth::getInstance();
|
||||||
|
$url = $this->config->geonetwork->url.'/srv/cn/'.$this->_request->getParam('url');
|
||||||
if (!$auth->hasIdentity())
|
if (!$auth->hasIdentity())
|
||||||
exit();
|
{
|
||||||
|
$this->_redirect('/account/login?href=/service/geonetwork?url='.$url);
|
||||||
|
}
|
||||||
$user = $auth->getIdentity();
|
$user = $auth->getIdentity();
|
||||||
//need to get pwd from database
|
//need to get pwd from database
|
||||||
$sql='select username,md5(password) as pwd from users where id='.$user->id;
|
$sql='select username,md5(password) as pwd from users where id='.$user->id;
|
||||||
|
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||||
$row=$this->db->fetchRow($sql);
|
$row=$this->db->fetchRow($sql);
|
||||||
$login=$this->config->geonetwork->url.'/srv/en/xml.user.login?username='.$row->username.'&password='.$row->pwd;
|
$login=$this->config->geonetwork->url.'/srv/en/xml.user.login?username='.$row->username.'&password='.$row->pwd;
|
||||||
$url = $this->config->geonetwork->url.'/srv/cn/'.$this->_request->getParam('url');
|
|
||||||
|
|
||||||
$body='<html>
|
$body='<html>
|
||||||
<script type="text/javascript" src="/js/jquery-1.7.min.js"></script>
|
<script type="text/javascript" src="/js/jquery-1.7.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -1245,7 +1247,7 @@ class ServiceController extends Zend_Controller_Action
|
||||||
</html>';
|
</html>';
|
||||||
$this->getResponse()->setHeader('Content-Type', 'text/html')
|
$this->getResponse()->setHeader('Content-Type', 'text/html')
|
||||||
->setBody($body);
|
->setBody($body);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
输出验证码
|
输出验证码
|
||||||
|
|
Loading…
Reference in New Issue