add return in mailer

This commit is contained in:
wlx 2011-10-12 13:33:32 +00:00
parent 59571458e7
commit 748a6f7f53
2 changed files with 1 additions and 54 deletions

View File

@ -11,6 +11,6 @@ class WestdcMailer extends Zend_Mail {
}
function send()
{
parent::send($this->tr);
return parent::send($this->tr);
}
}

View File

@ -1,53 +0,0 @@
<?php
class emailtext{
var $tmpid;
var $db;
var $data;
function __construct()
{
if(!is_numeric($this->tmpid)||empty($this->tmpid))
{
$this->tmpid = 0;
}
}
public function loadtmp(){
if(empty($this->tmpid))
{
return false;
}else{
$sql = "select id,content from emailtext where id='".$this->tmpid."'";
$rs = $this->db->query($sql);
$c = $rs->fetch();
if(!empty($c['id']))
{
if(count($this->data)==0)
{
return false;
}
else
{
$patterns = array();
$replacements = array();
foreach($this->data as $k=>$v)
{
$patterns[]='/{'.$k.'}/i';
$replacements[]=$v;
}
ksort($patterns);
ksort($replacements);
$newString=preg_replace($patterns, $replacements, $c['content']);
return $newString;
}//count($this->data)
}
else
{
return false;
}
}//empty($this->tmpid)
}//function loadtmp
}