Changeset 18718


Ignore:
Timestamp:
2010/06/21 14:47:05 (10 years ago)
Author:
nanasess
bzr:base-revision:
ohkouchi@loop-az.jp-20100621051136-5k3i43sorv0w6kn2
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/Smarty/templates/default/rss/index.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Frss%2Findex.tpl
data/class/pages/rss/LC_Page_Rss.php 16192@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Frss%2FLC_Page_Rss.php
bzr:mapping-version:
v4
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20100621054701-91y7wze51nhch4je
bzr:revno:
1925
bzr:revprop:branch-nick:
branches/version-2_4
bzr:root:
branches/version-2_4
bzr:text-parents:

data/Smarty/templates/default/rss/index.tpl svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/feature-module-update:17005
data/class/pages/rss/LC_Page_Rss.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2:17650
bzr:timestamp:
2010-06-21 14:47:01.549999952 +0900
bzr:user-agent:
bzr2.1.1+bzr-svn1.0.2
svn:original-date:
2010-06-21T05:47:01.550000Z
Message:

merged r18680, r18710

  • RSSの時間表示を修正(#363)
Location:
branches/version-2_4/data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_4/data/Smarty/templates/default/rss/index.tpl

    r17005 r18718  
    4747            <title> <!--{ $arrNews[cnt].news_title|sf_mb_convert_encoding:$encode|escape }--> </title> 
    4848            <description><!--{$arrNews[cnt].news_comment|truncate:256|sf_mb_convert_encoding:$encode|escape}--></description> 
    49             <!--{* <pubDate><!--{"r"|sf_mktime:$arrNews[cnt].hour:$arrNews[cnt].minute:$arrNews[cnt].second:$arrNews[cnt].month:$arrNews[cnt].day:$arrNews[cnt].year}--></pubDate> *}--> 
    50             <pubDate><!--{$timestamp|escape}--></pubDate> 
     49            <pubDate><!--{$arrNews[cnt].news_date|escape}--></pubDate> 
    5150        </item> 
    5251    <!--{/section}--> 
  • branches/version-2_4/data/class/pages/rss/LC_Page_Rss.php

    r17650 r18718  
    6969        //新着情報をセット 
    7070        $this->arrNews = $arrNews; 
    71         $this->timestamp = SC_Utils_Ex::sf_mktime("r", $arrNews[0]['hour'], $arrNews[0]['minute'], $arrNews[0]['second'], $arrNews[0]['month'], $arrNews[0]['day'], $arrNews[0]['year']); 
     71        // XXX 2.4.3 以下の互換性確保 
     72        $this->timestamp = $arrNews[0]['news_date']; 
    7273 
    7374        //店名をセット 
     
    104105        $col .= "     ,news_title ";                            //新着情報タイトル 
    105106        $col .= "     ,news_comment ";                          //新着情報本文 
    106  
    107         if (DB_TYPE == "pgsql") { 
    108             $col .= "     ,to_char(news_date, 'YYYY') AS YEAR ";    //日付(年) 
    109             $col .= "     ,to_char(news_date, 'MM') AS MONTH ";     //日付(月) 
    110             $col .= "     ,to_char(news_date, 'DD') AS DAY ";       //日付(日) 
    111             $col .= "     ,to_char(news_date, 'HH24') AS HOUR ";    //日付(時間) 
    112             $col .= "     ,to_char(news_date, 'MI') AS MINUTE ";    //日付(分) 
    113             $col .= "     ,to_char(news_date, 'SS') AS SECOND ";    //日付(秒) 
    114         }else if (DB_TYPE == "mysql") { 
    115             $col .= "     ,DATE_FORMAT(news_date, '%Y') AS YEAR ";      //日付(年) 
    116             $col .= "     ,DATE_FORMAT(news_date, '%m') AS MONTH ";     //日付(月) 
    117             $col .= "     ,DATE_FORMAT(news_date, '%d') AS DAY ";       //日付(日) 
    118             $col .= "     ,DATE_FORMAT(news_date, '%H') AS HOUR ";      //日付(時間) 
    119             $col .= "     ,DATE_FORMAT(news_date, '%i') AS MINUTE ";    //日付(分) 
    120             $col .= "     ,DATE_FORMAT(news_date, '%s') AS SECOND ";    //日付(秒) 
    121         } 
     107        $col .= "     ,news_date ";                             //新着情報日時 
    122108        $col .= "     ,news_url ";                              //新着情報URL 
    123109        $col .= "     ,news_select ";                           //新着情報の区分(1:URL、2:本文) 
     
    129115        $objQuery->setorder($order); 
    130116        $arrNews = $objQuery->select($col,$from,$where); 
     117 
     118        // RSS用に変換 
     119        foreach (array_keys($arrNews) as $key) { 
     120            $row =& $arrNews[$key]; 
     121            // 日付 
     122            $row['news_date'] = date("r", strtotime($row['news_date'])); 
     123        } 
     124 
    131125        return $arrNews; 
    132126    } 
Note: See TracChangeset for help on using the changeset viewer.