fix merge error

This commit is contained in:
wlx 2012-03-16 07:39:32 +00:00
parent eed2a9dec0
commit 5874a40e38
1 changed files with 8 additions and 6 deletions

View File

@ -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">