From 9bcfbce8de502e131b352f9f6240f243e41575df Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 12 Jun 2012 11:41:04 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=89=8D=E5=8F=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=91=E5=B8=83=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 2 +- .../default/controllers/AuthorController.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 00687521..4650b9fd 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -7,7 +7,7 @@ class Admin_DataController extends Zend_Controller_Action $this->view->config = Zend_Registry::get('config'); $this->messenger=$this->_helper->getHelper('FlashMessenger'); $this->view->messages = $this->messenger->getMessages(); - $this->debug = 1; + $this->debug = 0; //1:debug, 0:release $this->debug_email='wangliangxu@lzb.ac.cn'; } function postDispatch() diff --git a/application/default/controllers/AuthorController.php b/application/default/controllers/AuthorController.php index 3b8d0608..21753761 100644 --- a/application/default/controllers/AuthorController.php +++ b/application/default/controllers/AuthorController.php @@ -1782,7 +1782,7 @@ class AuthorController extends Zend_Controller_Action $iso=new ISO19115(); $iso->saveDB($this->db,$row['xml']); //移除中间版本 - $sql="delete from mdversion where uuid in (select uuid from mdversion where v.id=?) and char_length(changelog)<3"; + $sql="delete from mdversion where uuid in (select uuid from mdversion where id=?) and changelog is null"; $this->db->query($sql,array($id)); //修改评审状态为发布,且由其提交的用户进行管理 $sql="insert into mdstatus (uuid,status,userid) select uuid,6,? from mdversion where id=?"; @@ -1804,7 +1804,7 @@ class AuthorController extends Zend_Controller_Action if($this->debug==0) { $mail->addTo($this->view->config->service->email); - $mail->addCc($this->view->config->service->email); + //$mail->addCc($this->view->config->service->email); }else{ $mail->addTo($this->debug_email); } @@ -1815,7 +1815,7 @@ class AuthorController extends Zend_Controller_Action return true; } } - else if ($row['id']==-1 || $row['id']==0 || $row['id']==1) //取消发布的数据,初始状态,已接收 + else if ($row['status']==-1 || $row['status']==0 || $row['status']==1) //取消发布的数据,初始状态,已接收 { //同步元数据 $iso=new ISO19115(); @@ -1868,7 +1868,7 @@ class AuthorController extends Zend_Controller_Action $this->jsonexit($data); return true; } - else if ($row['id']==2 || $row['id']==3 || $row['id']==4)//已发送过外审邮件,需由编辑告知变化信息 + else if ($row['status']==2 || $row['status']==3 || $row['status']==4)//已发送过外审邮件,需由编辑告知变化信息 { //email to admin $mail=new WestdcMailer($this->view->config->smtp); @@ -1944,13 +1944,13 @@ class AuthorController extends Zend_Controller_Action $this->jsonexit($data); return true; } - else if ($row['id']>=5)//数据已经发布,再次修改后将只通知管理员,保留发布状态 + else if ($row['status']>=5)//数据已经发布,再次修改后将只通知管理员,保留发布状态 { //同步元数据 $iso=new ISO19115(); $iso->saveDB($this->db,$row['xml']); //移除中间版本 - $sql="delete from mdversion where uuid in (select uuid from mdversion where v.id=?) and char_length(changelog)<3"; + $sql="delete from mdversion where uuid in (select uuid from mdversion where id=?) and changelog is null"; $this->db->query($sql,array($id)); //email to admin & author @@ -1969,7 +1969,7 @@ class AuthorController extends Zend_Controller_Action if($this->debug==0) { $mail->addTo($this->view->config->service->email); - $mail->addCc($this->view->config->service->email); + //$mail->addCc($this->view->config->service->email); }else{ $mail->addTo($this->debug_email); }