Ignore:
Timestamp:
2009/11/04 23:38:25 (12 years ago)
Author:
Seasoft
Message:

LC_Page_FrontParts_Bloc#setTplMainpage 第1引数に絶対パス指定可能に改訂。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php

    r18234 r18367  
    4040     */ 
    4141    function setTplMainpage($bloc_file) { 
    42         $debug_message = ""; 
    43         $user_bloc_path = USER_TEMPLATE_PATH . TEMPLATE_NAME . "/" . BLOC_DIR . $bloc_file; 
    44         if (is_file($user_bloc_path)) { 
    45             $this->tpl_mainpage = $user_bloc_path; 
     42        $debug_message = ""; 
     43        if (substr($bloc_file, 0, 1) == '/') { 
     44            $this->tpl_mainpage = $bloc_file; 
    4645        } else { 
    47             $this->tpl_mainpage = BLOC_PATH . $bloc_file; 
     46            $user_bloc_path = USER_TEMPLATE_PATH . TEMPLATE_NAME . "/" . BLOC_DIR . $bloc_file; 
     47            if (is_file($user_bloc_path)) { 
     48                $this->tpl_mainpage = $user_bloc_path; 
     49            } else { 
     50                $this->tpl_mainpage = BLOC_PATH . $bloc_file; 
     51            } 
    4852        } 
    4953        $debug_message = "block:" . $this->tpl_mainpage . "\n"; 
Note: See TracChangeset for help on using the changeset viewer.