From 2a055c74f86c67d2a9ae4f552c5fc7d3c28bb216 Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 15 Mar 2012 12:42:23 +0000 Subject: [PATCH] =?UTF-8?q?fix=20ticket=20#306,=20=E5=AE=9E=E7=8E=B0geonet?= =?UTF-8?q?work=E7=9A=84=E8=87=AA=E5=8A=A8=E7=99=BB=E5=BD=95=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/ServiceController.php | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index 5767bdf6..8a1cd480 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -1211,5 +1211,40 @@ class ServiceController extends Zend_Controller_Action } echo ''; echo $pagnation; - }//文档页面相关数据 + }//文档页面相关数据 + function geonetwork() + { + $this->_helper->viewRenderer->setNoRender(); + $this->_helper->layout->disableLayout(); + $auth = Zend_Auth::getInstance(); + if (!$auth->hasIdentity()) + exit(); + $user = $auth->getIdentity(); + //need to get pwd from database + $sql='select username,md5(password) as pwd from users where id='.$user->id; + $row=$this->db->fetchRow($sql); + $login=$this->config->geonetwork->url.'/srv/en/xml.user.login?username='.$row->username.'&password='.$row->pwd; + $url = $this->_request->getParam('url'); + if empty($url) + $url='/geonetwork/srv/cn/'; + $body=' + + + + '; + $this->getResponse()->setHeader('Content-Type', 'text/html') + ->setBody($body); + } } \ No newline at end of file