remove unused code, fix doi problem
This commit is contained in:
parent
7c8ceda68d
commit
cc4a11d4cd
|
@ -12,11 +12,6 @@ class IndexController extends Zend_Controller_Action
|
||||||
|
|
||||||
function indexAction()
|
function indexAction()
|
||||||
{
|
{
|
||||||
//数据通讯
|
|
||||||
$l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
|
|
||||||
$this->view->newsletter=$l->getLast();
|
|
||||||
$name=basename($this->view->newsletter,'.pdf');
|
|
||||||
list(,$this->view->newsletterno)=explode("_",$name);
|
|
||||||
//统计数据
|
//统计数据
|
||||||
$sql='select (select count(*) from users) as usernum,(select count(*) from heihemetadata) as metanum,(select count(*) from offlineapp where ts_approved is not null ) as offlinenum';
|
$sql='select (select count(*) from users) as usernum,(select count(*) from heihemetadata) as metanum,(select count(*) from offlineapp where ts_approved is not null ) as offlinenum';
|
||||||
$row=$this->db->fetchRow($sql);
|
$row=$this->db->fetchRow($sql);
|
||||||
|
@ -38,9 +33,6 @@ class IndexController extends Zend_Controller_Action
|
||||||
//特色推荐
|
//特色推荐
|
||||||
$sql="select * from datafeature order by id desc";
|
$sql="select * from datafeature order by id desc";
|
||||||
$this->view->feature=$this->db->fetchRow($sql);
|
$this->view->feature=$this->db->fetchRow($sql);
|
||||||
//特色数据集
|
|
||||||
$sql="select * from datasetcd order by random()";
|
|
||||||
$this->view->datasetcd=$this->db->fetchRow($sql);
|
|
||||||
//下载最多数据(top 5)
|
//下载最多数据(top 5)
|
||||||
$sql="select uuid,title,id from heihemetadata where id in (select m.id from heihemetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=0 group by m.id order by count(d.uuid) desc limit 5)";
|
$sql="select uuid,title,id from heihemetadata where id in (select m.id from heihemetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=0 group by m.id order by count(d.uuid) desc limit 5)";
|
||||||
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
|
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||||
|
@ -85,7 +77,7 @@ class IndexController extends Zend_Controller_Action
|
||||||
|
|
||||||
$this->view->list_news = $rows;
|
$this->view->list_news = $rows;
|
||||||
|
|
||||||
$sql="select d.*,m.ts_published as publish_year from datadoi d right join heihemetadata m on d.uuid=m.uuid where d.ts_published is not null order by ts_published desc limit 4";
|
$sql="select d.*,m.ts_published as publish_year from datadoi d right join heihemetadata m on d.uuid=m.uuid where length(d.title)>1 and d.ts_published is not null order by ts_published desc limit 4";
|
||||||
$sth = $this->db->query($sql);
|
$sth = $this->db->query($sql);
|
||||||
$this->view->dois = $sth->fetchAll();
|
$this->view->dois = $sth->fetchAll();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue