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/pages/rss/LC_Page_Rss.php

    r22581 r22796  
    3232 * @version $Id$ 
    3333 */ 
    34 class LC_Page_RSS extends LC_Page_Ex  
    35 { 
     34class LC_Page_RSS extends LC_Page_Ex { 
    3635 
    3736    // }}} 
     
    4342     * @return void 
    4443     */ 
    45     function init() 
    46     { 
     44    function init() { 
    4745        parent::init(); 
    4846        $this->tpl_mainpage = 'rss/index.tpl'; 
     
    5654     * @return void 
    5755     */ 
    58     function process() 
    59     { 
     56    function process() { 
    6057 
     58        $objQuery = SC_Query_Ex::getSingletonInstance(); 
    6159        $objView = new SC_SiteView_Ex(false); 
    6260 
    6361        //新着情報を取得 
    64         $arrNews = $this->lfGetNews(); 
     62        $arrNews = $this->lfGetNews($objQuery); 
    6563 
    6664        //キャッシュしない(念のため) 
     
    9290     * @return void 
    9391     */ 
    94     function destroy() 
    95     { 
     92    function destroy() { 
    9693        parent::destroy(); 
    9794    } 
     
    10097     * 新着情報を取得する 
    10198     * 
     99     * @param SC_Query $objQuery DB操作クラス 
    102100     * @return array $arrNews 取得結果を配列で返す 
    103101     */ 
    104     function lfGetNews() 
    105     { 
    106         $objNews = new SC_Helper_News_Ex(); 
    107         $arrNews = $objNews->getList(); 
    108  
    109         $objDb = new SC_Helper_DB_Ex(); 
    110         $arrInfo = $objDb->sfGetBasisData(FALSE, 'shop_name, email04'); 
     102    function lfGetNews(&$objQuery) { 
     103        $col = ''; 
     104        $col .= 'news_id ';        // 新着情報ID 
     105        $col .= ',news_title ';    // 新着情報タイトル 
     106        $col .= ',news_comment ';  // 新着情報本文 
     107        $col .= ',news_date ';     // 日付 
     108        $col .= ',news_url ';      // 新着情報URL 
     109        $col .= ',news_select ';   // 新着情報の区分(1:URL、2:本文) 
     110        $col .= ',(SELECT shop_name FROM dtb_baseinfo limit 1) AS shop_name  ';    // 店名 
     111        $col .= ',(SELECT email04 FROM dtb_baseinfo limit 1) AS email ';           // 代表Emailアドレス 
     112        $from = 'dtb_news'; 
     113        $where = "del_flg = '0'"; 
     114        $order = 'rank DESC'; 
     115        $objQuery->setOrder($order); 
     116        $arrNews = $objQuery->select($col,$from,$where); 
    111117 
    112118        // RSS用に変換 
     
    115121 
    116122            $row =& $arrNews[$key]; 
    117             $row['shop_name'] = $arrInfo['shop_name']; 
    118             $row['email'] = $arrInfo['email04']; 
    119123            // 日付 
    120124            $row['news_date'] = date('r', strtotime($row['news_date'])); 
Note: See TracChangeset for help on using the changeset viewer.