修复前台版本发布错误
This commit is contained in:
parent
96fd6557ea
commit
9bcfbce8de
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue