Changeset 16275


Ignore:
Timestamp:
2007/10/05 21:36:25 (17 years ago)
Author:
nanasess
Message:

デザイン管理のブロック編集が反映されるよう修正

Location:
branches/feature-module-update/data/class/pages
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php

    r15784 r16275  
    6666        if ($bloc_id != '') { 
    6767            $arrBlocData = $this->lfgetBlocData(" bloc_id = ? " , array($bloc_id)); 
    68             $arrBlocData[0]['tpl_path'] = TEMPLATE_DIR . $arrBlocData[0]['tpl_path']; 
     68 
     69            // ユーザー作成ブロックが存在する場合 
     70            if (is_file(USER_PATH . $arrBlocData[0]['tpl_path'])) { 
     71                $arrBlocData[0]['tpl_path'] = USER_PATH 
     72                    . $arrBlocData[0]['tpl_path']; 
     73 
     74            // 存在しない場合は指定テンプレートのブロックを取得 
     75            } else { 
     76                $arrBlocData[0]['tpl_path'] = TEMPLATE_DIR 
     77                    . $arrBlocData[0]['tpl_path']; 
     78            } 
    6979 
    7080            // テンプレートファイルの読み込み 
     
    113123 
    114124                // ファイルの削除 
    115                 $del_file=BLOC_PATH . $arrBlocData[0]['filename']. '.tpl'; 
     125                //$del_file=BLOC_PATH . $arrBlocData[0]['filename']. '.tpl'; 
     126                $del_file = USER_PATH . $arrBlocData[0]['tpl_path']; 
    116127                if (file_exists($del_file)) { 
    117128                    unlink($del_file); 
     
    119130 
    120131                // ファイル作成 
    121                 $fp = fopen(BLOC_PATH . $_POST['filename'] . '.tpl',"w"); 
     132                $fp = fopen(USER_PATH . BLOC_DIR . $_POST['filename'] . '.tpl',"w"); 
    122133                fwrite($fp, $_POST['bloc_html']); // FIXME 
    123134                fclose($fp); 
     
    180191    function destroy() { 
    181192        parent::destroy(); 
     193        $this->p(USER_PATH . BLOC_DIR); 
    182194    } 
    183195 
  • branches/feature-module-update/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Best5.php

    r16159 r16275  
    2828    function init() { 
    2929        parent::init(); 
    30         $this->tpl_mainpage = BLOC_PATH . 'best5.tpl'; 
     30        $bloc_file = 'best5.tpl'; 
     31        if (is_file(USER_PATH . BLOC_DIR . $bloc_file)) { 
     32            $this->tpl_mainpage = USER_PATH . BLOC_DIR . $bloc_file; 
     33        } else { 
     34            $this->tpl_mainpage = BLOC_PATH . $bloc_file; 
     35        } 
    3136    } 
    3237 
  • branches/feature-module-update/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php

    r15532 r16275  
    1414 * @package Page 
    1515 * @author LOCKON CO.,LTD. 
    16  * @version $Id$ 
     16 * @version $Id:LC_Page_FrontParts_Bloc_Cart.php 15532 2007-08-31 14:39:46Z nanasess $ 
    1717 */ 
    1818class LC_Page_FrontParts_Bloc_Cart extends LC_Page { 
     
    2828    function init() { 
    2929        parent::init(); 
    30         $this->tpl_mainpage = BLOC_PATH . 'cart.tpl'; 
     30        $bloc_file = 'cart.tpl'; 
     31        if (is_file(USER_PATH . BLOC_DIR . $bloc_file)) { 
     32            $this->tpl_mainpage = USER_PATH . BLOC_DIR . $bloc_file; 
     33        } else { 
     34            $this->tpl_mainpage = BLOC_PATH . $bloc_file; 
     35        } 
    3136    } 
    3237 
  • branches/feature-module-update/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Category.php

    r16147 r16275  
    2828    function init() { 
    2929        parent::init(); 
    30         $this->tpl_mainpage = BLOC_PATH . 'category.tpl'; 
     30        $bloc_file = 'category.tpl'; 
     31        if (is_file(USER_PATH . BLOC_DIR . $bloc_file)) { 
     32            $this->tpl_mainpage = USER_PATH . BLOC_DIR . $bloc_file; 
     33        } else { 
     34            $this->tpl_mainpage = BLOC_PATH . $bloc_file; 
     35        } 
    3136    } 
    3237 
  • branches/feature-module-update/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Login.php

    r16057 r16275  
    2828    function init() { 
    2929        parent::init(); 
    30         $this->tpl_mainpage = BLOC_PATH . 'login.tpl'; 
     30        $bloc_file = 'login.tpl'; 
     31        if (is_file(USER_PATH . BLOC_DIR . $bloc_file)) { 
     32            $this->tpl_mainpage = USER_PATH . BLOC_DIR . $bloc_file; 
     33        } else { 
     34            $this->tpl_mainpage = BLOC_PATH . $bloc_file; 
     35        } 
    3136        $this->tpl_login = false; 
    3237        $this->tpl_disable_logout = false; 
  • branches/feature-module-update/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_News.php

    r16161 r16275  
    2828    function init() { 
    2929        parent::init(); 
    30         $this->tpl_mainpage = BLOC_PATH . 'news.tpl'; 
     30        $bloc_file = 'news.tpl'; 
     31        if (is_file(USER_PATH . BLOC_DIR . $bloc_file)) { 
     32            $this->tpl_mainpage = USER_PATH . BLOC_DIR . $bloc_file; 
     33        } else { 
     34            $this->tpl_mainpage = BLOC_PATH . $bloc_file; 
     35        } 
    3136    } 
    3237 
  • branches/feature-module-update/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_SearchProducts.php

    r15532 r16275  
    1414 * @package Page 
    1515 * @author LOCKON CO.,LTD. 
    16  * @version $Id$ 
     16 * @version $Id:LC_Page_FrontParts_Bloc_SearchProducts.php 15532 2007-08-31 14:39:46Z nanasess $ 
    1717 */ 
    1818class LC_Page_FrontParts_Bloc_SearchProducts extends LC_Page { 
     
    2828    function init() { 
    2929        parent::init(); 
    30         $this->tpl_mainpage = BLOC_PATH . 'search_products.tpl'; 
     30        $bloc_file = 'search_products.tpl'; 
     31        if (is_file(USER_PATH . BLOC_DIR . $bloc_file)) { 
     32            $this->tpl_mainpage = USER_PATH . BLOC_DIR . $bloc_file; 
     33        } else { 
     34            $this->tpl_mainpage = BLOC_PATH . $bloc_file; 
     35        } 
    3136    } 
    3237 
Note: See TracChangeset for help on using the changeset viewer.