版本提交中状态变量错误修复以及移除中间版本错误修复

This commit is contained in:
wlx 2012-06-12 10:11:18 +00:00
parent ce88ae9963
commit 77282a198e
1 changed files with 5 additions and 5 deletions

View File

@ -1982,7 +1982,7 @@ class Admin_DataController extends Zend_Controller_Action
$iso=new ISO19115(); $iso=new ISO19115();
$iso->saveDB($this->db,$row['xml']); $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 char_length(changelog)<3";
$this->db->query($sql,array($id)); $this->db->query($sql,array($id));
//修改评审状态为发布,且由其提交的用户进行管理 //修改评审状态为发布,且由其提交的用户进行管理
$sql="insert into mdstatus (uuid,status,userid) select uuid,6,? from mdversion where id=?"; $sql="insert into mdstatus (uuid,status,userid) select uuid,6,? from mdversion where id=?";
@ -2015,7 +2015,7 @@ class Admin_DataController extends Zend_Controller_Action
return true; 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(); $iso=new ISO19115();
@ -2068,7 +2068,7 @@ class Admin_DataController extends Zend_Controller_Action
$this->jsonexit($data); $this->jsonexit($data);
return true; 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 //email to admin
$mail=new WestdcMailer($this->view->config->smtp); $mail=new WestdcMailer($this->view->config->smtp);
@ -2144,13 +2144,13 @@ class Admin_DataController extends Zend_Controller_Action
$this->jsonexit($data); $this->jsonexit($data);
return true; return true;
} }
else if ($row['id']>=5)//数据已经发布,再次修改后将只通知管理员,保留发布状态 else if ($row['status']>=5)//数据已经发布,再次修改后将只通知管理员,保留发布状态
{ {
//同步元数据 //同步元数据
$iso=new ISO19115(); $iso=new ISO19115();
$iso->saveDB($this->db,$row['xml']); $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 char_length(changelog)<3";
$this->db->query($sql,array($id)); $this->db->query($sql,array($id));
//email to admin & author //email to admin & author