From 0952b7e5069281596c7d68971690eb0621abb248 Mon Sep 17 00:00:00 2001 From: jack Date: Wed, 7 Feb 2018 15:00:33 +0800 Subject: [PATCH] comment out email --- .../default/controllers/AuthorController.php | 352 +++++++++--------- 1 file changed, 176 insertions(+), 176 deletions(-) diff --git a/application/default/controllers/AuthorController.php b/application/default/controllers/AuthorController.php index 5320d182..e53b66b7 100644 --- a/application/default/controllers/AuthorController.php +++ b/application/default/controllers/AuthorController.php @@ -1882,47 +1882,47 @@ class AuthorController extends Zend_Controller_Action $this->db->query($sql,array($u_id,$id)); //email to admin - $mail=new WestdcMailer($this->view->config->smtp); - $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); - $mailtp=new EmailText($this->db,"metadata-new-admin",array( - 'user' => $user->username, - 'uuid' => $iso->uuid, - 'email'=> $user->email, - //元数据标题 - 'title'=> $iso->resTitle, - )); - $mail->setBodyText($mailtp->getBody()); - $mail->setSubject($mailtp->getSubject()); - if($this->debug==0) - { - $mail->addTo($this->view->config->service->email); - }else{ - $mail->addTo($this->debug_email); - } - $mail->send(); +// $mail=new WestdcMailer($this->view->config->smtp); +// $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); +// $mailtp=new EmailText($this->db,"metadata-new-admin",array( +// 'user' => $user->username, +// 'uuid' => $iso->uuid, +// 'email'=> $user->email, +// //元数据标题 +// 'title'=> $iso->resTitle, +// )); +// $mail->setBodyText($mailtp->getBody()); +// $mail->setSubject($mailtp->getSubject()); +// if($this->debug==0) +// { +// $mail->addTo($this->view->config->service->email); +// }else{ +// $mail->addTo($this->debug_email); +// } +// $mail->send(); unset($mail); unset($mailtp); //email to author - $mail=new WestdcMailer($this->view->config->smtp); - $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); - $mailtp=new EmailText($this->db,"metadata-new-author",array( - 'user' => $user->username, - 'uuid' => $iso->uuid, - 'email'=> $user->email, - //元数据标题 - 'title'=> $iso->resTitle, - )); - $mail->setBodyText($mailtp->getBody()); - $mail->setSubject($mailtp->getSubject()); - if($this->debug==0) - { - $mail->addTo($user->email); - $mail->addCc($this->view->config->service->email); - }else{ - $mail->addTo($this->debug_email); - } - @$mail->send(); +// $mail=new WestdcMailer($this->view->config->smtp); +// $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); +// $mailtp=new EmailText($this->db,"metadata-new-author",array( +// 'user' => $user->username, +// 'uuid' => $iso->uuid, +// 'email'=> $user->email, +// //元数据标题 +// 'title'=> $iso->resTitle, +// )); +// $mail->setBodyText($mailtp->getBody()); +// $mail->setSubject($mailtp->getSubject()); +// if($this->debug==0) +// { +// $mail->addTo($user->email); +// $mail->addCc($this->view->config->service->email); +// }else{ +// $mail->addTo($this->debug_email); +// } +// @$mail->send(); $data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功提交,请等待数据中心进一步处理!')); $this->jsonexit($data); @@ -1947,26 +1947,26 @@ class AuthorController extends Zend_Controller_Action $this->db->query($sql,array($u_id,$id)); //email to admin & author - $mail=new WestdcMailer($this->view->config->smtp); - $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); - $mailtp=new EmailText($this->db,"metadata-release",array( - 'user' => $user->username, - 'uuid' => $row['uuid'], - 'email'=> $user->email, - //元数据标题 - 'title'=> $row['title'], - 'changelog'=>$changelog, - )); - $mail->setBodyText($mailtp->getBody()); - $mail->setSubject($mailtp->getSubject()); - if($this->debug==0) - { - $mail->addTo($this->view->config->service->email); - //$mail->addCc($this->view->config->service->email); - }else{ - $mail->addTo($this->debug_email); - } - @$mail->send(); +// $mail=new WestdcMailer($this->view->config->smtp); +// $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); +// $mailtp=new EmailText($this->db,"metadata-release",array( +// 'user' => $user->username, +// 'uuid' => $row['uuid'], +// 'email'=> $user->email, +// //元数据标题 +// 'title'=> $row['title'], +// 'changelog'=>$changelog, +// )); +// $mail->setBodyText($mailtp->getBody()); +// $mail->setSubject($mailtp->getSubject()); +// if($this->debug==0) +// { +// $mail->addTo($this->view->config->service->email); +// //$mail->addCc($this->view->config->service->email); +// }else{ +// $mail->addTo($this->debug_email); +// } +// @$mail->send(); $data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功发布!')); $this->jsonexit($data); @@ -1987,48 +1987,48 @@ class AuthorController extends Zend_Controller_Action @$iso->saveDB($this->db); //email to admin - $mail=new WestdcMailer($this->view->config->smtp); - $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); - $mailtp=new EmailText($this->db,"version-commit-admin",array( - 'user' => $user->username, - 'uuid' => $row['uuid'], - 'email'=> $user->email, - //元数据标题 - 'title'=> $row['title'], - 'changelog'=>$changelog, - )); - $mail->setBodyText($mailtp->getBody()); - $mail->setSubject($mailtp->getSubject()); - if($this->debug==0) - { - $mail->addTo($this->view->config->service->email); - }else{ - $mail->addTo($this->debug_email); - } - $mail->send(); +// $mail=new WestdcMailer($this->view->config->smtp); +// $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); +// $mailtp=new EmailText($this->db,"version-commit-admin",array( +// 'user' => $user->username, +// 'uuid' => $row['uuid'], +// 'email'=> $user->email, +// //元数据标题 +// 'title'=> $row['title'], +// 'changelog'=>$changelog, +// )); +// $mail->setBodyText($mailtp->getBody()); +// $mail->setSubject($mailtp->getSubject()); +// if($this->debug==0) +// { +// $mail->addTo($this->view->config->service->email); +// }else{ +// $mail->addTo($this->debug_email); +// } +// $mail->send(); unset($mail); unset($mailtp); //email to author - $mail=new WestdcMailer($this->view->config->smtp); - $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); - $mailtp=new EmailText($this->db,"version-commit-author",array( - 'user' => $user->username, - 'uuid' => $row['uuid'], - 'email'=> $user->email, - //元数据标题 - 'title'=> $row['title'], - )); - $mail->setBodyText($mailtp->getBody()); - $mail->setSubject($mailtp->getSubject()); - if($this->debug==0) - { - $mail->addTo($user->email); - $mail->addCc($this->view->config->service->email); - }else{ - $mail->addTo($this->debug_email); - } - @$mail->send(); +// $mail=new WestdcMailer($this->view->config->smtp); +// $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); +// $mailtp=new EmailText($this->db,"version-commit-author",array( +// 'user' => $user->username, +// 'uuid' => $row['uuid'], +// 'email'=> $user->email, +// //元数据标题 +// 'title'=> $row['title'], +// )); +// $mail->setBodyText($mailtp->getBody()); +// $mail->setSubject($mailtp->getSubject()); +// if($this->debug==0) +// { +// $mail->addTo($user->email); +// $mail->addCc($this->view->config->service->email); +// }else{ +// $mail->addTo($this->debug_email); +// } +// @$mail->send(); $data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功提交并同步,请等待数据中心进一步处理!')); $this->jsonexit($data); @@ -2040,48 +2040,48 @@ class AuthorController extends Zend_Controller_Action $iso=new ISO19115(); @$iso->loadXML($row['xml']); //email to admin - $mail=new WestdcMailer($this->view->config->smtp); - $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); - $mailtp=new EmailText($this->db,"version-commit-admin",array( - 'user' => $user->username, - 'uuid' => $row['uuid'], - 'email'=> $user->email, - //元数据标题 - 'title'=> $row['title'], - 'changelog'=>$changelog, - )); - $mail->setBodyText($mailtp->getBody()); - $mail->setSubject($mailtp->getSubject()); - if($this->debug==0) - { - $mail->addTo($this->view->config->service->email); - }else{ - $mail->addTo($this->debug_email); - } - $mail->send(); +// $mail=new WestdcMailer($this->view->config->smtp); +// $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); +// $mailtp=new EmailText($this->db,"version-commit-admin",array( +// 'user' => $user->username, +// 'uuid' => $row['uuid'], +// 'email'=> $user->email, +// //元数据标题 +// 'title'=> $row['title'], +// 'changelog'=>$changelog, +// )); +// $mail->setBodyText($mailtp->getBody()); +// $mail->setSubject($mailtp->getSubject()); +// if($this->debug==0) +// { +// $mail->addTo($this->view->config->service->email); +// }else{ +// $mail->addTo($this->debug_email); +// } +// $mail->send(); unset($mail); unset($mailtp); //email to author - $mail=new WestdcMailer($this->view->config->smtp); - $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); - $mailtp=new EmailText($this->db,"version-commit-author",array( - 'user' => $user->username, - 'uuid' => $row['uuid'], - 'email'=> $user->email, - //元数据标题 - 'title'=> $row['title'], - )); - $mail->setBodyText($mailtp->getBody()); - $mail->setSubject($mailtp->getSubject()); - if($this->debug==0) - { - $mail->addTo($user->email); - $mail->addCc($this->view->config->service->email); - }else{ - $mail->addTo($this->debug_email); - } - @$mail->send(); +// $mail=new WestdcMailer($this->view->config->smtp); +// $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); +// $mailtp=new EmailText($this->db,"version-commit-author",array( +// 'user' => $user->username, +// 'uuid' => $row['uuid'], +// 'email'=> $user->email, +// //元数据标题 +// 'title'=> $row['title'], +// )); +// $mail->setBodyText($mailtp->getBody()); +// $mail->setSubject($mailtp->getSubject()); +// if($this->debug==0) +// { +// $mail->addTo($user->email); +// $mail->addCc($this->view->config->service->email); +// }else{ +// $mail->addTo($this->debug_email); +// } +// @$mail->send(); //email to experts $sql="select u.username,u.email from mdexpertreview e left join users u on e.id=u.id where e.status in (0,1) and e.uuid=?"; @@ -2091,29 +2091,29 @@ class AuthorController extends Zend_Controller_Action unset($mail); unset($mailtp); - $mail=new WestdcMailer($this->view->config->smtp); - $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); - $mailtp=new EmailText($this->db,"version-commit-expert",array( - 'user' => $user->username, - 'uuid' => $row['uuid'], - 'email'=> $user->email, - //元数据标题 - 'title'=> $row['title'], - )); - $mail->setBodyText($mailtp->getBody()); - $mail->setSubject($mailtp->getSubject()); - $filecontent=file_get_contents("http://" . $_SERVER['HTTP_HOST'].'/service/doc/uuid/'.$row['uuid']); - $mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.doc'); - $filecontent=file_get_contents("http://" . $_SERVER['HTTP_HOST'].'/service/pdf/uuid/'.$row['uuid']); - $mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.pdf'); - if($this->debug==0) - { - foreach ($experts as $expert) $mail->addTo($expert['email']); - $mail->addCc($this->view->config->service->email); - }else{ - $mail->addTo($this->debug_email); - } - @$mail->send(); +// $mail=new WestdcMailer($this->view->config->smtp); +// $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); +// $mailtp=new EmailText($this->db,"version-commit-expert",array( +// 'user' => $user->username, +// 'uuid' => $row['uuid'], +// 'email'=> $user->email, +// //元数据标题 +// 'title'=> $row['title'], +// )); +// $mail->setBodyText($mailtp->getBody()); +// $mail->setSubject($mailtp->getSubject()); +// $filecontent=file_get_contents("http://" . $_SERVER['HTTP_HOST'].'/service/doc/uuid/'.$row['uuid']); +// $mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.doc'); +// $filecontent=file_get_contents("http://" . $_SERVER['HTTP_HOST'].'/service/pdf/uuid/'.$row['uuid']); +// $mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.pdf'); +// if($this->debug==0) +// { +// foreach ($experts as $expert) $mail->addTo($expert['email']); +// $mail->addCc($this->view->config->service->email); +// }else{ +// $mail->addTo($this->debug_email); +// } +// @$mail->send(); $data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功提交,请等待数据中心进一步处理!')); $this->jsonexit($data); @@ -2137,26 +2137,26 @@ class AuthorController extends Zend_Controller_Action $this->db->query($sql,array($id)); //email to admin & author - $mail=new WestdcMailer($this->view->config->smtp); - $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); - $mailtp=new EmailText($this->db,"metadata-release",array( - 'user' => $user->username, - 'uuid' => $row['uuid'], - 'email'=> $user->email, - //元数据标题 - 'title'=> $row['title'], - 'changelog'=>$changelog, - )); - $mail->setBodyText($mailtp->getBody()); - $mail->setSubject($mailtp->getSubject()); - if($this->debug==0) - { - $mail->addTo($this->view->config->service->email); - //$mail->addCc($this->view->config->service->email); - }else{ - $mail->addTo($this->debug_email); - } - @$mail->send(); +// $mail=new WestdcMailer($this->view->config->smtp); +// $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); +// $mailtp=new EmailText($this->db,"metadata-release",array( +// 'user' => $user->username, +// 'uuid' => $row['uuid'], +// 'email'=> $user->email, +// //元数据标题 +// 'title'=> $row['title'], +// 'changelog'=>$changelog, +// )); +// $mail->setBodyText($mailtp->getBody()); +// $mail->setSubject($mailtp->getSubject()); +// if($this->debug==0) +// { +// $mail->addTo($this->view->config->service->email); +// //$mail->addCc($this->view->config->service->email); +// }else{ +// $mail->addTo($this->debug_email); +// } +// @$mail->send(); $data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功发布!')); $this->jsonexit($data);