Ignore:
Timestamp:
2011/08/04 02:38:15 (13 years ago)
Author:
Seasoft
Message:

#797 (新着情報のURLが同一ホスト時にモバイルサイトのセッションが切れる)

  • 絶対パス対応
Location:
branches/version-2_11-dev/data
Files:
2 edited

Legend:

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

    r20764 r21121  
    3636        <!--{section name=cnt loop=$arrNews}--> 
    3737            <item> 
    38                 <!--{if $arrNews[cnt].news_url == ''}--> 
    39                     <link><!--{$smarty.const.HTTP_URL}--></link> 
    40                 <!--{else}--> 
    41                     <link><!--{$arrNews[cnt].news_url|h}--></link> 
    42                 <!--{/if}--> 
     38                <link><!--{$arrNews[cnt].news_url|h}--></link> 
    4339                <title><!--{$arrNews[cnt].news_title|sfMbConvertEncoding:$encode|h}--></title> 
    4440                <description><!--{$arrNews[cnt].news_comment|truncate:256|sfMbConvertEncoding:$encode|h}--></description> 
  • branches/version-2_11-dev/data/class/pages/rss/LC_Page_Rss.php

    r20764 r21121  
    116116        // RSS用に変換 
    117117        foreach (array_keys($arrNews) as $key) { 
     118            $netUrlHttpUrl = new Net_URL(HTTP_URL); 
     119 
    118120            $row =& $arrNews[$key]; 
    119121            // 日付 
    120122            $row['news_date'] = date('r', strtotime($row['news_date'])); 
     123            // 新着情報URL 
     124            if (SC_Utils_Ex::isBlank($row['news_url'])) { 
     125                $row['news_url'] = HTTP_URL; 
     126            } 
     127            elseif ($row['news_url'][0] == '/') { 
     128                // 変換(絶対パス→URL) 
     129                $netUrl = new Net_URL($row['news_url']); 
     130                $netUrl->protocol = $netUrlHttpUrl->protocol; 
     131                $netUrl->user = $netUrlHttpUrl->user; 
     132                $netUrl->pass = $netUrlHttpUrl->pass; 
     133                $netUrl->host = $netUrlHttpUrl->host; 
     134                $netUrl->port = $netUrlHttpUrl->port; 
     135                $row['news_url'] = $netUrl->getUrl(); 
     136            } 
    121137        } 
    122138 
Note: See TracChangeset for help on using the changeset viewer.