From 79e12c9797a8a2ab099df202f2c50de0dfcdeeb4 Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 27 Oct 2011 10:02:30 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=82=AE=E4=BB=B6=E5=8F=91?= =?UTF-8?q?=E9=80=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/DataController.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 56be0ff0..116f6e13 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -627,8 +627,7 @@ class DataController extends Zend_Controller_Action if ($this->_request->isPost()) { include_once("bcspamblock.php"); $formdata=$this->_request->getPost(); - //if (bcspamblock_verify() && $commentForm->isValid($formdata)) { - if ( $commentForm->isValid($formdata)) { + if (bcspamblock_verify() && $commentForm->isValid($formdata)) { $sql="insert into comments (userid,uuid,author,email,url,ip,content,agent,type) values(?,?,?,?,?,?,?,?,?)"; $agent=$this->_request->getHeader('User-Agent'); $ip=$this->_request->getServer('REMOTE_ADDR'); @@ -642,20 +641,13 @@ class DataController extends Zend_Controller_Action $patt['uuid'] = $formdata['uuid']; $patt['title']= $this->view->metadata->title; $patt['content']= $content; - /* - $patt = array( - 'user' =>$author, - 'uuid' =>$formdata['uuid'], - 'title' =>$this->view->metadata['title'], - //'content' =>$content - );*/ - $mailtp=new EmailText($this->db,"data-comments-posted",$patt); + $mailtp=new EmailText($this->db,"data-comment-note",$patt); $mail=new WestdcMailer($this->view->config->smtp); $mail->setBodyText($mailtp->getBody()); $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); $mail->addTo($this->view->config->service->email); $mail->setSubject($mailtp->getSubject()); - @$mail->send(); + $mail->send(); $formdata['content']=''; } } elseif ($user) {