Ticket #303 在离线申请通过之前加入了数据作者的意见判断

This commit is contained in:
Li Jianxuan 2012-03-12 09:44:13 +00:00
parent 4d1f68cdbf
commit 70a99bd3b0
1 changed files with 16 additions and 6 deletions

View File

@ -84,6 +84,16 @@ class Admin_DownController extends Zend_Controller_Action
$this->_redirect('/admin/down/offlineapp/'.$page);
} elseif ($finish) {
try {
$sql = "SELECT authorpermitted FROM dataorder WHERE offlineappid=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($finish));
$row = $sth->fetch();
if($row['authorpermitted'] <0)
{
$this->messenger->addMessage('提示信息:数据作者明确反对该下载申请,所以不能进行进一步通过');
$this->_redirect('/admin/down/offlineapp/'.$page);
}
$sql="update dataorder set status=5,ts_approved=now() where offlineappid=?";
$this->db->query($sql,array($finish));
$sql="update offlineapp set ts_approved=now() where id=? and ts_approved is null";