Ignore:
Timestamp:
2012/02/15 19:56:17 (14 years ago)
Author:
Seasoft
Message:

#1625 (typo修正・ソース整形・ソースコメントの改善)

File:
1 edited

Legend:

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

    r21481 r21514  
    4444 
    4545    /* DBに登録されたテンプレートメールの送信 */ 
    46     function sfSendTemplateMail($to, $to_name, $template_id, &$objPage, $from_address = "", $from_name = "", $reply_to = "", $bcc = '') { 
     46    function sfSendTemplateMail($to, $to_name, $template_id, &$objPage, $from_address = '', $from_name = '', $reply_to = "", $bcc = '') { 
    4747 
    4848        $objQuery = new SC_Query_Ex(); 
    4949        // メールテンプレート情報の取得 
    50         $where = "template_id = ?"; 
    51         $arrRet = $objQuery->select("subject, header, footer", 'dtb_mailtemplate', $where, array($template_id)); 
     50        $where = 'template_id = ?'; 
     51        $arrRet = $objQuery->select('subject, header, footer', 'dtb_mailtemplate', $where, array($template_id)); 
    5252        $objPage->tpl_header = $arrRet[0]['header']; 
    5353        $objPage->tpl_footer = $arrRet[0]['footer']; 
     
    6363        // メール送信処理 
    6464        $objSendMail = new SC_SendMail_Ex(); 
    65         if ($from_address == "") $from_address = $arrInfo['email03']; 
    66         if ($from_name == "") $from_name = $arrInfo['shop_name']; 
    67         if ($reply_to == "") $reply_to = $arrInfo['email03']; 
     65        if ($from_address == '') $from_address = $arrInfo['email03']; 
     66        if ($from_name == '') $from_name = $arrInfo['shop_name']; 
     67        if ($reply_to == '') $reply_to = $arrInfo['email03']; 
    6868        $error = $arrInfo['email04']; 
    6969        $tosubject = $this->sfMakeSubject($tmp_subject, $objMailView); 
     
    7575 
    7676    /* 受注完了メール送信 */ 
    77     function sfSendOrderMail($order_id, $template_id, $subject = "", $header = "", $footer = "", $send = true) { 
     77    function sfSendOrderMail($order_id, $template_id, $subject = '', $header = '', $footer = "", $send = true) { 
    7878 
    7979        $arrTplVar = new stdClass(); 
     
    8383        $objQuery = new SC_Query_Ex(); 
    8484 
    85         if ($subject == "" && $header == "" && $footer == "") { 
     85        if ($subject == '' && $header == '' && $footer == "") { 
    8686            // メールテンプレート情報の取得 
    87             $where = "template_id = ?"; 
    88             $arrRet = $objQuery->select("subject, header, footer", 'dtb_mailtemplate', $where, array($template_id)); 
     87            $where = 'template_id = ?'; 
     88            $arrRet = $objQuery->select('subject, header, footer', 'dtb_mailtemplate', $where, array($template_id)); 
    8989            $arrTplVar->tpl_header = $arrRet[0]['header']; 
    9090            $arrTplVar->tpl_footer = $arrRet[0]['footer']; 
     
    9797 
    9898        // 受注情報の取得 
    99         $where = "order_id = ?"; 
    100         $arrRet = $objQuery->select("*", 'dtb_order', $where, array($order_id)); 
     99        $where = 'order_id = ?'; 
     100        $arrRet = $objQuery->select('*', 'dtb_order', $where, array($order_id)); 
    101101        $arrOrder = $arrRet[0]; 
    102102        $objQuery->setOrder('order_detail_id'); 
    103         $arrTplVar->arrOrderDetail = $objQuery->select("*", 'dtb_order_detail', $where, array($order_id)); 
     103        $arrTplVar->arrOrderDetail = $objQuery->select('*', 'dtb_order_detail', $where, array($order_id)); 
    104104 
    105105        $objProduct = new SC_Product_Ex(); 
    106106        $objQuery->setOrder('shipping_id'); 
    107         $arrRet = $objQuery->select("*", 'dtb_shipping', "order_id = ?", array($order_id)); 
     107        $arrRet = $objQuery->select('*', 'dtb_shipping', "order_id = ?", array($order_id)); 
    108108        foreach (array_keys($arrRet) as $key) { 
    109109            $objQuery->setOrder('shipping_id'); 
    110             $arrItems = $objQuery->select("*", 'dtb_shipment_item', "order_id = ? AND shipping_id = ?", 
     110            $arrItems = $objQuery->select('*', 'dtb_shipment_item', "order_id = ? AND shipping_id = ?", 
    111111                                          array($order_id, $arrRet[$key]['shipping_id'])); 
    112112            foreach ($arrItems as $itemKey => $arrDetail) { 
     
    126126        $objQuery->setOrder('customer_id'); 
    127127        $arrRet = $objQuery->select('point', 'dtb_customer', "customer_id = ?", array($customer_id)); 
    128         $arrCustomer = isset($arrRet[0]) ? $arrRet[0] : ""; 
     128        $arrCustomer = isset($arrRet[0]) ? $arrRet[0] : ''; 
    129129 
    130130        $arrTplVar->arrCustomer = $arrCustomer; 
     
    132132 
    133133        //その他決済情報 
    134         if ($arrOrder['memo02'] != "") { 
     134        if ($arrOrder['memo02'] != '') { 
    135135            $arrOther = unserialize($arrOrder['memo02']); 
    136136 
    137137            foreach ($arrOther as $other_key => $other_val) { 
    138                 if (SC_Utils_Ex::sfTrim($other_val['value']) == "") { 
    139                     $arrOther[$other_key]['value'] = ""; 
     138                if (SC_Utils_Ex::sfTrim($other_val['value']) == '') { 
     139                    $arrOther[$other_key]['value'] = ''; 
    140140                } 
    141141            } 
     
    236236        $sqlval['send_date'] = 'CURRENT_TIMESTAMP'; 
    237237        if (!isset($_SESSION['member_id'])) $_SESSION['member_id'] = ""; 
    238         if ($_SESSION['member_id'] != "") { 
     238        if ($_SESSION['member_id'] != '') { 
    239239            $sqlval['creator_id'] = $_SESSION['member_id']; 
    240240        } else { 
     
    250250    /* 会員登録があるかどうかのチェック(仮会員を含まない) */ 
    251251    function sfCheckCustomerMailMaga($email) { 
    252         $col = "email, mailmaga_flg, customer_id"; 
     252        $col = 'email, mailmaga_flg, customer_id'; 
    253253        $from = 'dtb_customer'; 
    254         $where = "(email = ? OR email_mobile = ?) AND status = 2 AND del_flg = 0"; 
     254        $where = '(email = ? OR email_mobile = ?) AND status = 2 AND del_flg = 0'; 
    255255        $objQuery = new SC_Query_Ex(); 
    256256        $arrRet = $objQuery->select($col, $from, $where, array($email)); 
     
    275275            $arrCustomerData = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($customer_id); 
    276276        } else { 
    277             $arrCustomerData = SC_Helper_Customer_Ex::sfGetCustomerDataFromId('', "secret_key = ?", array($secret_key)); 
     277            $arrCustomerData = SC_Helper_Customer_Ex::sfGetCustomerDataFromId('', 'secret_key = ?', array($secret_key)); 
    278278        } 
    279279        if (SC_Utils_Ex::isBlank($arrCustomerData)) { 
     
    296296        if (CUSTOMER_CONFIRM_MAIL == true and $arrCustomerData['status'] == 1) { 
    297297            $subject        = $objHelperMail->sfMakeSubject('会員登録のご確認', $objMailText); 
    298             $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl"); 
     298            $toCustomerMail = $objMailText->fetch('mail_templates/customer_mail.tpl'); 
    299299        } else { 
    300300            $subject        = $objHelperMail->sfMakeSubject('会員登録のご完了', $objMailText); 
    301             $toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl"); 
     301            $toCustomerMail = $objMailText->fetch('mail_templates/customer_regist_mail.tpl'); 
    302302        } 
    303303 
     
    347347 
    348348        // 表示順 
    349         $objQuery->setOrder("create_date DESC"); 
     349        $objQuery->setOrder('create_date DESC'); 
    350350 
    351351        $arrResults = $objQuery->select('*', 'dtb_mailmaga_template', $where, $arrValues); 
     
    374374 
    375375        // 表示順 
    376         $objQuery->setOrder("create_date DESC"); 
     376        $objQuery->setOrder('create_date DESC'); 
    377377 
    378378        $arrResults = $objQuery->select('*', 'dtb_send_history', $where, $arrValues); 
     
    414414            // お名前の変換 
    415415            $customerName = trim($arrDestination['name']); 
    416             $subjectBody = preg_replace("/{name}/", $customerName, $arrMail['subject']); 
    417             $mailBody = preg_replace("/{name}/", $customerName, $arrMail['body']); 
     416            $subjectBody = preg_replace('/{name}/', $customerName, $arrMail['subject']); 
     417            $mailBody = preg_replace('/{name}/', $customerName, $arrMail['body']); 
    418418 
    419419            $objMail->setItem( 
     
    459459 
    460460        // 送信完了 報告メール 
    461         $compSubject = date("Y年m月d日H時i分") . "  下記メールの配信が完了しました。"; 
     461        $compSubject = date('Y年m月d日H時i分') . '  下記メールの配信が完了しました。'; 
    462462        // 管理者宛に変更 
    463463        $objMail->setTo($objSite['email03']); 
Note: See TracChangeset for help on using the changeset viewer.