Changeset 20223


Ignore:
Timestamp:
2011/02/20 02:45:48 (13 years ago)
Author:
miningbrownie
Message:

ボスの周辺にいる雑魚の退治的なリファクタリング。ちょろいなフフ。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_MailView.php

    r20214 r20223  
    6464     */ 
    6565    function action() { 
     66        $send_id = $_GET['send_id']; 
    6667        // 認証可否の判定 
    6768        SC_Utils_Ex::sfIsSuccess(new SC_Session()); 
    68  
    69         if(SC_Utils_Ex::sfIsInt($_GET['send_id'])) { 
    70             $objQuery =& SC_Query::getSingletonInstance(); 
    71             $col = "subject, mail_body"; 
    72             $where = "send_id = ?"; 
    73             $arrRet = $objQuery->select($col, "dtb_mail_history", $where, array($_GET['send_id'])); 
    74             $this->tpl_subject = $arrRet[0]['subject']; 
    75             $this->tpl_body = $arrRet[0]['mail_body']; 
     69        if(SC_Utils_Ex::sfIsInt($send_id)) { 
     70            $mailHistory = $this->getMailHistory($send_id); 
     71            $this->tpl_subject = $mailHistory[0]['subject']; 
     72            $this->tpl_body = $mailHistory[0]['mail_body']; 
    7673        } 
    7774        $this->setTemplate($this->tpl_mainpage); 
    7875    } 
    7976 
     77    /** 
     78     *  
     79     * メールの履歴を取り出す。 
     80     * @param int $send_id 
     81     */ 
     82    function getMailHistory($send_id){ 
     83        $objQuery =& SC_Query::getSingletonInstance(); 
     84        $col = "subject, mail_body"; 
     85        $where = "send_id = ?"; 
     86        $mailHistory = $objQuery->select($col, "dtb_mail_history", $where, array($send_id)); 
     87        return $mailHistory; 
     88    } 
    8089 
    8190 
Note: See TracChangeset for help on using the changeset viewer.