Ignore:
Timestamp:
2013/05/02 18:11:36 (11 years ago)
Author:
h_yoshimoto
Message:

#2236 2.12.3リリース以降の2.12-devへのコミット差し戻し

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/helper/SC_Helper_Mail.php

    r22584 r22796  
    2929 * @version $Id$ 
    3030 */ 
    31 class SC_Helper_Mail  
    32 { 
     31class SC_Helper_Mail { 
    3332 
    3433    /** メールテンプレートのパス */ 
     
    4544     * コンストラクタ. 
    4645     */ 
    47     function __construct() 
    48     { 
     46    function __construct() { 
    4947        $masterData = new SC_DB_MasterData_Ex(); 
    5048        $this->arrMAILTPLPATH =  $masterData->getMasterData('mtb_mail_tpl_path'); 
     
    5755     * @param LC_Page $objPage 
    5856     */ 
    59     function setPage(LC_Page $objPage) 
    60     { 
     57    function setPage(LC_Page $objPage) { 
    6158        $this->objPage = $objPage; 
    6259    } 
     
    6764     * @return LC_Page 
    6865     */ 
    69     function getPage() 
    70     { 
     66    function getPage() { 
    7167        return $this->objPage; 
    7268    } 
    7369 
    7470    /* DBに登録されたテンプレートメールの送信 */ 
    75     function sfSendTemplateMail($to, $to_name, $template_id, &$objPage, $from_address = '', $from_name = '', $reply_to = '', $bcc = '') 
    76     { 
    77  
     71    function sfSendTemplateMail($to, $to_name, $template_id, &$objPage, $from_address = '', $from_name = '', $reply_to = '', $bcc = '') { 
     72 
     73        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    7874        // メールテンプレート情報の取得 
    79         $objMailtemplate = new SC_Helper_Mailtemplate_Ex(); 
    80         $mailtemplate = $objMailtemplate->get($template_id); 
    81         $objPage->tpl_header = $mailtemplate['header']; 
    82         $objPage->tpl_footer = $mailtemplate['footer']; 
    83         $tmp_subject = $mailtemplate['subject']; 
     75        $where = 'template_id = ?'; 
     76        $arrRet = $objQuery->select('subject, header, footer', 'dtb_mailtemplate', $where, array($template_id)); 
     77        $objPage->tpl_header = $arrRet[0]['header']; 
     78        $objPage->tpl_footer = $arrRet[0]['footer']; 
     79        $tmp_subject = $arrRet[0]['subject']; 
    8480 
    8581        $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); 
     
    105101 
    106102    /* 受注完了メール送信 */ 
    107     function sfSendOrderMail($order_id, $template_id, $subject = '', $header = '', $footer = '', $send = true) 
    108     { 
     103    function sfSendOrderMail($order_id, $template_id, $subject = '', $header = '', $footer = '', $send = true) { 
    109104 
    110105        $arrTplVar = new stdClass(); 
     
    116111        if ($subject == '' && $header == '' && $footer == '') { 
    117112            // メールテンプレート情報の取得 
    118             $objMailtemplate = new SC_Helper_Mailtemplate_Ex(); 
    119             $mailtemplate = $objMailtemplate->get($template_id); 
    120             $arrTplVar->tpl_header = $mailtemplate['header']; 
    121             $arrTplVar->tpl_footer = $mailtemplate['footer']; 
    122             $tmp_subject = $mailtemplate['subject']; 
     113            $where = 'template_id = ?'; 
     114            $arrRet = $objQuery->select('subject, header, footer', 'dtb_mailtemplate', $where, array($template_id)); 
     115            $arrTplVar->tpl_header = $arrRet[0]['header']; 
     116            $arrTplVar->tpl_footer = $arrRet[0]['footer']; 
     117            $tmp_subject = $arrRet[0]['subject']; 
    123118        } else { 
    124119            $arrTplVar->tpl_header = $header; 
     
    218213 
    219214    // テンプレートを使用したメールの送信 
    220     function sfSendTplMail($to, $tmp_subject, $tplpath, &$objPage) 
    221     { 
     215    function sfSendTplMail($to, $tmp_subject, $tplpath, &$objPage) { 
    222216        $objMailView = new SC_SiteView_Ex(); 
    223217        $objMailView->setPage($this->getPage()); 
     
    240234 
    241235    // 通常のメール送信 
    242     function sfSendMail($to, $tmp_subject, $body) 
    243     { 
     236    function sfSendMail($to, $tmp_subject, $body) { 
    244237        $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); 
    245238        // メール送信処理 
     
    255248 
    256249    //件名にテンプレートを用いる 
    257     function sfMakeSubject($subject, &$objMailView) 
    258     { 
     250    function sfMakeSubject($subject, &$objMailView) { 
    259251        if (empty($objMailView)) { 
    260252            $objMailView = new SC_SiteView_Ex(); 
     
    275267 
    276268    // メール配信履歴への登録 
    277     function sfSaveMailHistory($order_id, $template_id, $subject, $body) 
    278     { 
     269    function sfSaveMailHistory($order_id, $template_id, $subject, $body) { 
    279270        $sqlval = array(); 
    280271        $sqlval['subject'] = $subject; 
     
    296287 
    297288    /* 会員登録があるかどうかのチェック(仮会員を含まない) */ 
    298     function sfCheckCustomerMailMaga($email) 
    299     { 
     289    function sfCheckCustomerMailMaga($email) { 
    300290        $col = 'email, mailmaga_flg, customer_id'; 
    301291        $from = 'dtb_customer'; 
     
    318308     * @return boolean true:成功 false:失敗 
    319309     */ 
    320     function sfSendRegistMail($secret_key, $customer_id = '', $is_mobile = false) 
    321     { 
     310    function sfSendRegistMail($secret_key, $customer_id = '', $is_mobile = false) { 
    322311        // 会員データの取得 
    323312        if (SC_Utils_Ex::sfIsInt($customer_id)) { 
     
    382371     * @todo   表示順も引数で変更できるように 
    383372     */ 
    384     function sfGetMailmagaTemplate($template_id = null) 
    385     { 
     373    function sfGetMailmagaTemplate($template_id = null) { 
    386374        // 初期化 
    387375        $where = ''; 
     
    409397     * @return array 送信履歴情報を格納した配列 
    410398     */ 
    411     function sfGetSendHistory($send_id = null) 
    412     { 
     399    function sfGetSendHistory($send_id = null) { 
    413400        // 初期化 
    414401        $where = ''; 
     
    438425     * @return void 
    439426     */ 
    440     function sfSendMailmagazine($send_id) 
    441     { 
     427    function sfSendMailmagazine($send_id) { 
    442428        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    443429        $objDb = new SC_Helper_DB_Ex(); 
Note: See TracChangeset for help on using the changeset viewer.