Ignore:
Timestamp:
2013/02/26 20:55:22 (11 years ago)
Author:
pineray
Message:

#2164 pageクラスからdtb_mailtemplateテーブルを直接指定している箇所をなくす

File:
1 edited

Legend:

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

    r22567 r22584  
    7676    { 
    7777 
    78         $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    7978        // メールテンプレート情報の取得 
    80         $where = 'template_id = ?'; 
    81         $arrRet = $objQuery->select('subject, header, footer', 'dtb_mailtemplate', $where, array($template_id)); 
    82         $objPage->tpl_header = $arrRet[0]['header']; 
    83         $objPage->tpl_footer = $arrRet[0]['footer']; 
    84         $tmp_subject = $arrRet[0]['subject']; 
     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']; 
    8584 
    8685        $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); 
     
    117116        if ($subject == '' && $header == '' && $footer == '') { 
    118117            // メールテンプレート情報の取得 
    119             $where = 'template_id = ?'; 
    120             $arrRet = $objQuery->select('subject, header, footer', 'dtb_mailtemplate', $where, array($template_id)); 
    121             $arrTplVar->tpl_header = $arrRet[0]['header']; 
    122             $arrTplVar->tpl_footer = $arrRet[0]['footer']; 
    123             $tmp_subject = $arrRet[0]['subject']; 
     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']; 
    124123        } else { 
    125124            $arrTplVar->tpl_header = $header; 
Note: See TracChangeset for help on using the changeset viewer.