From 1edecd120a721c7bd202f88dfb20a3381aed2fe3 Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 20 Nov 2013 09:50:41 +0000 Subject: [PATCH] =?UTF-8?q?fix=20#567,=20=E9=99=90=E5=AE=9A=E6=96=BD?= =?UTF-8?q?=E5=BC=95=E6=96=87=E7=8C=AE=E7=9A=84=E6=98=BE=E7=A4=BA=E6=95=B0?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/DataController.php | 2 +- .../default/controllers/KnowledgeController.php | 11 ++++++++++- application/default/views/scripts/data/view.phtml | 4 ++++ application/default/views/scripts/heihe/view.phtml | 4 ++++ application/default/views/scripts/hiwater/view.phtml | 4 ++++ .../default/views/scripts/knowledge/user.phtml | 6 +++++- application/default/views/scripts/water/view.phtml | 4 ++++ 7 files changed, 32 insertions(+), 3 deletions(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 5768028c..1e34826e 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -618,7 +618,7 @@ class DataController extends Zend_Controller_Action $sql=$this->db->quoteInto($sql,$uuid); $this->view->themeref=$this->db->fetchAll($sql); //用户发表文献 - $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=1"; + $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=1 order by r.language asc,r.year desc,r.ts_created desc limit 15"; $sql=$this->db->quoteInto($sql,$uuid); $this->view->userref=$this->db->fetchAll($sql); //多篇引用形式:hiwater diff --git a/application/default/controllers/KnowledgeController.php b/application/default/controllers/KnowledgeController.php index db750d94..9e76286c 100755 --- a/application/default/controllers/KnowledgeController.php +++ b/application/default/controllers/KnowledgeController.php @@ -42,7 +42,16 @@ class KnowledgeController extends Zend_Controller_Action function userAction() { - $sql="select * from reference where id in (select refid from mdref where reftype=1 and uuid in (select uuid from normalmetadata)) order by year desc, reference desc"; + $uuid=$this->_request->getParam('uuid'); + if (preg_match('/([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})/',$uuid)) + { + $sql="select uuid,title from metadata where uuid='$uuid'"; + $sth = $this->db->prepare($sql); + $sth->execute(); + $this->view->md = $sth->fetch(); + $sql="select * from reference where id in (select refid from mdref where reftype=1 and uuid='$uuid') order by year desc, reference desc"; + } else + $sql="select * from reference where id in (select refid from mdref where reftype=1 and uuid in (select uuid from normalmetadata)) order by year desc, reference desc"; $sth = $this->db->prepare($sql); $sth->execute(); $rows = $sth->fetchAll(); diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml index 88c54e7c..6e60839d 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -100,6 +100,10 @@ if ($md->title_en) echo '
'.$this->escape($md->title_en);?> } echo ""; endforeach; + if (count($this->userref)==15) + { + echo '更多施引文献'; + } ?> diff --git a/application/default/views/scripts/heihe/view.phtml b/application/default/views/scripts/heihe/view.phtml index 7e752c00..5136e386 100755 --- a/application/default/views/scripts/heihe/view.phtml +++ b/application/default/views/scripts/heihe/view.phtml @@ -122,6 +122,10 @@ if ($md->title_en) echo '
'.$this->escape($md->title_en);?> } echo ""; endforeach; + if (count($this->userref)==15) + { + echo '更多施引文献'; + } ?> diff --git a/application/default/views/scripts/hiwater/view.phtml b/application/default/views/scripts/hiwater/view.phtml index 2330ecdc..5a8a2783 100644 --- a/application/default/views/scripts/hiwater/view.phtml +++ b/application/default/views/scripts/hiwater/view.phtml @@ -120,6 +120,10 @@ if ($md->title_en) echo '
'.$this->escape($md->title_en);?> } echo ""; endforeach; + if (count($this->userref)==15) + { + echo '更多施引文献'; + } ?> diff --git a/application/default/views/scripts/knowledge/user.phtml b/application/default/views/scripts/knowledge/user.phtml index 08bceb34..d30d8d99 100644 --- a/application/default/views/scripts/knowledge/user.phtml +++ b/application/default/views/scripts/knowledge/user.phtml @@ -16,7 +16,11 @@ $this->headLink()->appendStylesheet('/css/colorbox.css');
-

数据施引文献库

+

数据施引文献库

+ md) : + echo '

'.$this->md['title'].'

'; + endif; + ?>
paginator)): ?>
    diff --git a/application/default/views/scripts/water/view.phtml b/application/default/views/scripts/water/view.phtml index db5ab149..a548d2bb 100755 --- a/application/default/views/scripts/water/view.phtml +++ b/application/default/views/scripts/water/view.phtml @@ -101,6 +101,10 @@ h3.gs_rt{font-size:110%;} } echo ""; endforeach; + if (count($this->userref)==15) + { + echo '更多施引文献'; + } ?>