Changeset 20459


Ignore:
Timestamp:
2011/03/02 13:55:04 (10 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:20458
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/Smarty/templates/default/abouts/index.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fabouts%2Findex.tpl
data/class/SC_View.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_View.php
data/class/helper/SC_Helper_DB.php 15176@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fhelper%2FSC_Helper_DB.php
data/class/helper/SC_Helper_Mail.php 15618@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fhelper%2FSC_Helper_Mail.php
data/class/pages/LC_Page.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2FLC_Page.php
data/class/pages/abouts/LC_Page_Abouts.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fabouts%2FLC_Page_Abouts.php
data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Calendar.php 17073@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcomu-ver2%2Fdata%2Fclass%2Fpages%2Ffrontparts%2Fbloc%2FLC_Page_FrontParts_Bloc_Calendar.php
data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php 15367@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Ffrontparts%2Fbloc%2FLC_Page_FrontParts_Bloc_Cart.php
data/class/pages/rss/LC_Page_Rss_Products.php 16193@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Frss%2FLC_Page_Rss_Products.php
data/require_classes.php 18500@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_4-dev%2Fdata%2Frequire_classes.php
bzr:mapping-version:
v4
bzr:merge:

ohkouchi@loop-az.jp-20110302045234-il10jugwj4mjz27h
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20110302045448-fb8y0kp3tbqnr6lt
bzr:revno:
3186
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/Smarty/templates/default/abouts/index.tpl ohkouchi@loop-az.jp-20110302045234-il10jugwj4mjz27h
data/class/SC_View.php ohkouchi@loop-az.jp-20110302045234-il10jugwj4mjz27h
data/class/helper/SC_Helper_DB.php ohkouchi@loop-az.jp-20110302045234-il10jugwj4mjz27h
data/class/helper/SC_Helper_Mail.php ohkouchi@loop-az.jp-20110302045234-il10jugwj4mjz27h
data/class/pages/LC_Page.php ohkouchi@loop-az.jp-20110302045234-il10jugwj4mjz27h
data/class/pages/abouts/LC_Page_Abouts.php ohkouchi@loop-az.jp-20110302045234-il10jugwj4mjz27h
data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Calendar.php ohkouchi@loop-az.jp-20110302045234-il10jugwj4mjz27h
data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php ohkouchi@loop-az.jp-20110302045234-il10jugwj4mjz27h
data/class/pages/rss/LC_Page_Rss_Products.php ohkouchi@loop-az.jp-20110302045234-il10jugwj4mjz27h
data/require_classes.php ohkouchi@loop-az.jp-20110302045234-il10jugwj4mjz27h
bzr:timestamp:
2011-03-02 13:54:48.059999943 +0900
bzr:user-agent:
bzr2.2.1+bzr-svn1.0.4
svn:original-date:
2011-03-02T04:54:48.060000Z
Message:

#997(冗長な dtb_baseinfo の取得)

  • SC_View のコンストラクタで取得していたのを LC_Page へ移動

#793 (非推奨機能の削除)

  • SC_SiteInfo クラスの削除
Location:
branches/version-2_5-dev/data
Files:
1 deleted
10 edited

Legend:

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

    r20290 r20459  
    2323*}--> 
    2424<!--▼CONTENTS--> 
    25 <!--{assign var=_site value=$arrSiteInfo}--> 
    2625<script type="text/javascript">//<![CDATA[ 
    2726$(function() { 
     
    3332        'height': '300px' 
    3433    }); 
    35     var lat = <!--{$_site.latitude}--> 
    36     var lng = <!--{$_site.longitude}--> 
     34    var lat = <!--{$objSiteInfo->data.latitude}--> 
     35    var lng = <!--{$objSiteInfo->data.longitude}--> 
    3736    if (lat && lng) { 
    3837        var latlng = new google.maps.LatLng(lat, lng); 
  • branches/version-2_5-dev/data/class/SC_View.php

    r20303 r20459  
    2222 */ 
    2323 
    24 $viewDir = realpath(dirname(__FILE__)) . '/'; // XXX グローバル変数として流用あり 
    25 require_once $viewDir . '../module/Smarty/libs/Smarty.class.php'; 
     24require_once realpath(dirname(__FILE__)) . '/../module/Smarty/libs/Smarty.class.php'; 
    2625 
    2726class SC_View { 
    2827 
    2928    var $_smarty; 
    30     var $objSiteInfo; // サイト情報 
    3129 
    3230    // コンストラクタ 
    3331    function SC_View($siteinfo = true) { 
    34         global $viewDir; 
    3532 
    3633        $this->_smarty = new Smarty; 
     
    5148        $this->_smarty->register_modifier("sfRmDupSlash", array("SC_Utils_Ex", "sfRmDupSlash")); 
    5249        $this->_smarty->register_modifier("sfCutString", array("SC_Utils_Ex", "sfCutString")); 
    53         $this->_smarty->plugins_dir=array("plugins", $viewDir . "../smarty_extends"); 
     50        $this->_smarty->plugins_dir=array("plugins", realpath(dirname(__FILE__)) . "/../smarty_extends"); 
    5451        $this->_smarty->register_modifier("sfMbConvertEncoding", array("SC_Utils_Ex", "sfMbConvertEncoding")); 
    5552        $this->_smarty->register_modifier("sfGetEnabled", array("SC_Utils_Ex", "sfGetEnabled")); 
     
    6360        if(ADMIN_MODE == '1') { 
    6461            $this->time_start = SC_Utils_Ex::sfMicrotimeFloat(); 
    65         } 
    66  
    67         // サイト情報を取得する 
    68         // XXX LC_Page 配下で取得した方が良い 
    69         if($siteinfo) { 
    70             if(!defined('LOAD_SITEINFO')) { 
    71                 $this->objSiteInfo = new SC_SiteInfo(); 
    72                 $arrInfo['arrSiteInfo'] = $this->objSiteInfo->data; 
    73  
    74                 // 都道府県名を変換 
    75                 $masterData = new SC_DB_MasterData_Ex(); 
    76                 $arrPref = $masterData->getMasterData('mtb_pref'); 
    77                 $arrInfo['arrSiteInfo']['pref'] = 
    78                     isset($arrPref[$arrInfo['arrSiteInfo']['pref']]) 
    79                     ? $arrPref[$arrInfo['arrSiteInfo']['pref']] : ""; 
    80  
    81                  // サイト情報を割り当てる 
    82                 foreach ($arrInfo as $key => $value){ 
    83                     $this->_smarty->assign($key, $value); 
    84                 } 
    85  
    86                 define('LOAD_SITEINFO', 1); 
    87             } 
    8862        } 
    8963    } 
     
    161135    /* サイト初期設定 */ 
    162136    function initpath() { 
    163         global $viewDir; 
    164137 
    165         $array['tpl_mainnavi'] = $viewDir . '../Smarty/templates/frontparts/mainnavi.tpl'; 
     138        $array['tpl_mainnavi'] = realpath(dirname(__FILE__)) . '/../Smarty/templates/frontparts/mainnavi.tpl'; 
    166139 
    167140        $objDb = new SC_Helper_DB_Ex(); 
  • branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php

    r20428 r20459  
    137137     * 店舗基本情報を取得する. 
    138138     * 
     139     * 引数 $force が false の場合は, 初回のみ DB 接続し, 
     140     * 2回目以降はキャッシュされた結果を使用する. 
     141     * 
    139142     * @param boolean $force 強制的にDB取得するか 
    140143     * @param string $col 取得カラムを指定する 
  • branches/version-2_5-dev/data/class/helper/SC_Helper_Mail.php

    r20435 r20459  
    5454        $tmp_subject = $arrRet[0]['subject']; 
    5555 
    56         $objSiteInfo = new SC_SiteInfo(); 
    57         $arrInfo = $objSiteInfo->data; 
     56        $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); 
    5857 
    5958        $objMailView = new SC_SiteView_Ex(); 
     
    7978 
    8079        $arrTplVar = new stdClass(); 
    81         $objSiteInfo = new SC_SiteInfo(); 
    82         $arrInfo = $objSiteInfo->data; 
     80        $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); 
    8381        $arrTplVar->arrInfo = $arrInfo; 
    8482 
     
    185183    function sfSendTplMail($to, $tmp_subject, $tplpath, &$objPage) { 
    186184        $objMailView = new SC_SiteView_Ex(); 
    187         $objSiteInfo = new SC_SiteInfo(); 
    188         $arrInfo = $objSiteInfo->data; 
     185        $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); 
    189186        // メール本文の取得 
    190187        $objPage->tpl_shopname=$arrInfo['shop_name']; 
     
    205202    // 通常のメール送信 
    206203    function sfSendMail($to, $tmp_subject, $body) { 
    207         $objSiteInfo = new SC_SiteInfo(); 
    208         $arrInfo = $objSiteInfo->data; 
     204        $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); 
    209205        // メール送信処理 
    210206        $objSendMail = new SC_SendMail_Ex(); 
  • branches/version-2_5-dev/data/class/pages/LC_Page.php

    r20384 r20459  
    7676    var $template = SITE_FRAME; 
    7777 
     78    /** 店舗基本情報 */ 
     79    var $arrSiteInfo; 
     80 
    7881    // }}} 
    7982    // {{{ functions 
     
    100103        $this->objPlugin = new SC_Helper_Plugin_Ex(); 
    101104        $this->objPlugin->preProcess($this); 
     105 
     106        // 店舗基本情報取得 
     107        $this->arrSiteInfo = SC_Helper_DB_Ex::sfGetBasisData(); 
    102108 
    103109        // トランザクショントークンの検証と生成 
  • branches/version-2_5-dev/data/class/pages/abouts/LC_Page_Abouts.php

    r20344 r20459  
    6767     */ 
    6868    function action() { 
    69         $this->objSiteInfo = new SC_SiteInfo(); 
     69        $this->objSiteInfo->data = SC_Helper_DB_Ex::sfGetBasisData(); 
    7070        $this->objSiteInfo->data['pref'] = 
    7171            isset($this->arrPref[$this->objSiteInfo->data['pref']]) 
  • branches/version-2_5-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Calendar.php

    r20395 r20459  
    149149     */ 
    150150    function lfGetRegularHoliday() { 
    151         $objSiteInfo = new SC_SiteInfo(); 
    152         $arrRegularHoliday = explode('|', $objSiteInfo->data['regular_holiday_ids']); 
     151        $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); 
     152        $arrRegularHoliday = explode('|', $arrInfo['regular_holiday_ids']); 
    153153        return $arrRegularHoliday; 
    154154    } 
  • branches/version-2_5-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php

    r20444 r20459  
    6464    function action() { 
    6565        $objCart = new SC_CartSession_Ex(); 
    66         $objSiteInfo = new SC_SiteInfo; 
    6766        $this->isMultiple = $objCart->isMultiple(); 
    68         $this->arrCartList = $this->lfGetCartData($objCart, $objSiteInfo); 
     67        $this->arrCartList = $this->lfGetCartData($objCart); 
    6968    } 
    7069 
     
    8281     * 
    8382     * @param SC_CartSession $objCart カートセッション管理クラス 
    84      * @param SC_SiteInfo $objSiteInfo サイト情報クラス 
    8583     * @return array $arrCartList カートデータ配列 
    8684     */ 
    87     function lfGetCartData(&$objCart, &$objSiteInfo) { 
     85    function lfGetCartData(&$objCart) { 
    8886        $arrCartKeys = $objCart->getKeys(); 
    8987        foreach ($arrCartKeys as $cart_key) { 
     
    106104         
    107105        // 店舗情報の取得 
    108         $arrInfo = $objSiteInfo->data; 
     106        $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); 
    109107         
    110108        // 送料無料までの金額 
     
    117115         
    118116        return $arrCartList; 
    119          
    120117    } 
    121  
    122118} 
    123119?> 
  • branches/version-2_5-dev/data/class/pages/rss/LC_Page_Rss_Products.php

    r20344 r20459  
    6565    function action() { 
    6666        $objView = new SC_SiteView_Ex(); 
    67         $objSiteInfo = new SC_SiteInfo(); 
    6867         
    6968        //店舗情報をセット 
    70         $this->arrSiteInfo = $objSiteInfo->data; 
     69        $this->arrSiteInfo = SC_Helper_DB_Ex::sfGetBasisData(); 
    7170         
    7271        //商品IDを取得 
  • branches/version-2_5-dev/data/require_classes.php

    r20449 r20459  
    4141require_once(CLASS_REALDIR . "SC_Image.php"); 
    4242require_once(CLASS_REALDIR . "SC_UploadFile.php"); 
    43 require_once(CLASS_REALDIR . "SC_SiteInfo.php"); 
    4443require_once(CLASS_EX_REALDIR . "SC_SendMail_Ex.php"); 
    4544require_once(CLASS_REALDIR . "SC_FormParam.php"); 
Note: See TracChangeset for help on using the changeset viewer.