修复了未认证作者发送审核邮件时的错误,添加了邮件发送者

This commit is contained in:
wlx 2012-05-10 02:00:54 +00:00
parent 67a2d1e70c
commit b44784d565
1 changed files with 8 additions and 5 deletions

View File

@ -80,6 +80,7 @@ class Admin_DownController extends Zend_Controller_Action
unset($mail);
$mail = new WestdcMailer($this->view->config->smtp);
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data));
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject());
$mail->addTo($tmp_email);
@ -102,6 +103,7 @@ class Admin_DownController extends Zend_Controller_Action
unset($mail);
$mail = new WestdcMailer($this->view->config->smtp);
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data));
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject());
$mail->addTo($tmp_email);
@ -112,7 +114,7 @@ class Admin_DownController extends Zend_Controller_Action
// 2. 处理委托数据中心进行管理的数据
$sql="select m.title,d.uuid from dataorder d left join mdstatus s on d.uuid=s.uuid left join metadata m on m.uuid=d.uuid
where d.offlineappid=? and s.status=7 order by u.email,m.title";
where d.offlineappid=? and s.status=7 order by m.title";
$rows=$this->db->fetchAll($this->db->quoteInto($sql,$start));
$data="";
foreach($rows as $row)
@ -125,6 +127,7 @@ class Admin_DownController extends Zend_Controller_Action
unset($mail);
$mail = new WestdcMailer($this->view->config->smtp);
$mailtp=new EmailText($this->db,'offline-start-dcadmin',array('user'=>$username,'datalist'=>$data));
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject());
$addrs=array();
@ -141,8 +144,8 @@ class Admin_DownController extends Zend_Controller_Action
//无数据作者的数据,根据元数据中的联系人信息发送相应的管理邮件,发送策略是多发还是少发?
//发送管理邮件同时建议用户认证为数据的作者,可以有更多的管理选择,同时邮件中应该有详细的说明为什么会收到此邮件
$sql="select res.email,d.uuid,m.title,role.role from dataorder d left join role on d.uuid=role.uuid left join responsible res on role.resid=res.id
left join metadata m on d.uuid=m.uuid where length(res.email)>4 and d.offlineappid=?
and role.role in ('pointOfContact','custodian','resourceProvider','owner','distributor','publisher','author')
left join metadata m on d.uuid=m.uuid left join mdstatus s on d.uuid=s.uuid where length(res.email)>4 and d.offlineappid=?
and (s.status=5 or s.status is null) and role.role in ('pointOfContact','custodian','resourceProvider','owner','distributor','publisher','author')
order by m.title,res.email";
$rows=$this->db->fetchAll($this->db->quoteInto($sql,$start));
unset($addrs);
@ -262,8 +265,8 @@ class Admin_DownController extends Zend_Controller_Action
}
$tmp_email=$row;
}
$data.=" 数据名称:".$row['title']."\n";
$data.=" \t数据地址http://westdc.westgis.ac.cn/data/".$row['uuid']."\n";
$data.=" 数据名称:".$newmd['title'][$k]."\n";
$data.=" \t数据地址http://westdc.westgis.ac.cn/data/".$newmd['uuid'][$k]."\n";
$data.=" \t如您不想收到此类数据申请审核的邮件您可以在按如下操作办法进行处理1. 申请成为该数据作者2. 将该数据委托给数据中心代为审核,委托后您也可以随时撤销此委托以便继续自行管理。\n";
$data.=" \t如要申请成为该数据作者:进入数据中心->数据作者->数据认证,查找到对应的数据后,在其下方点击申请认证即可。\n\n";
}