Changeset 23370


Ignore:
Timestamp:
2014/04/18 01:56:55 (7 years ago)
Author:
nanasess
Message:

fixes #2505 (Windows 版 PHP5.3.28 以降で画面が真っ白になる)

  • パスを正規化するように修正
  • Smarty 内部では DIRECTORY_SEPARATOR が使用されるため, realpath() 関数を使用する
Location:
branches/version-2_13-dev
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/class/SC_AdminView.php

    r23124 r23370  
    3333        parent::init(); 
    3434 
    35         $this->_smarty->template_dir = TEMPLATE_ADMIN_REALDIR; 
    36         $this->_smarty->compile_dir = COMPILE_ADMIN_REALDIR; 
     35        $this->_smarty->template_dir = realpath(TEMPLATE_ADMIN_REALDIR); 
     36        $this->_smarty->compile_dir = realpath(COMPILE_ADMIN_REALDIR); 
    3737        $this->assign('TPL_URLPATH_PC', ROOT_URLPATH . USER_DIR . USER_PACKAGE_DIR . TEMPLATE_NAME . '/'); 
    3838        $this->assign('TPL_URLPATH_DEFAULT', ROOT_URLPATH . USER_DIR . USER_PACKAGE_DIR . DEFAULT_TEMPLATE_NAME . '/'); 
  • branches/version-2_13-dev/data/class/SC_InstallView.php

    r23124 r23370  
    2828        parent::__construct(); 
    2929 
    30         $this->_smarty->template_dir = $template_dir; 
    31         $this->_smarty->compile_dir = $compile_dir; 
     30        $this->_smarty->template_dir = realpath($template_dir); 
     31        $this->_smarty->compile_dir = realpath($compile_dir); 
    3232    } 
    3333} 
  • branches/version-2_13-dev/data/class/SC_MobileView.php

    r23124 r23370  
    3333        parent::init(); 
    3434 
    35         $this->_smarty->template_dir = MOBILE_TEMPLATE_REALDIR; 
    36         $this->_smarty->compile_dir = MOBILE_COMPILE_REALDIR; 
     35        $this->_smarty->template_dir = realpath(MOBILE_TEMPLATE_REALDIR); 
     36        $this->_smarty->compile_dir = realpath(MOBILE_COMPILE_REALDIR); 
    3737        $this->assignTemplatePath(DEVICE_TYPE_MOBILE); 
    3838    } 
  • branches/version-2_13-dev/data/class/SC_SiteView.php

    r23124 r23370  
    3737        parent::init(); 
    3838 
    39         $this->_smarty->template_dir = TEMPLATE_REALDIR; 
    40         $this->_smarty->compile_dir = COMPILE_REALDIR; 
     39        $this->_smarty->template_dir = realpath(TEMPLATE_REALDIR); 
     40        $this->_smarty->compile_dir = realpath(COMPILE_REALDIR); 
    4141 
    4242        $this->assignTemplatePath(DEVICE_TYPE_PC); 
  • branches/version-2_13-dev/data/class/SC_SmartphoneView.php

    r23124 r23370  
    3333        parent::init(); 
    3434 
    35         $this->_smarty->template_dir = SMARTPHONE_TEMPLATE_REALDIR; 
    36         $this->_smarty->compile_dir = SMARTPHONE_COMPILE_REALDIR; 
     35        $this->_smarty->template_dir = realpath(SMARTPHONE_TEMPLATE_REALDIR); 
     36        $this->_smarty->compile_dir = realpath(SMARTPHONE_COMPILE_REALDIR); 
    3737        $this->assignTemplatePath(DEVICE_TYPE_SMARTPHONE); 
    3838    } 
  • branches/version-2_13-dev/html/admin/require.php

    r22206 r23370  
    2323 
    2424// rtrim は PHP バージョン依存対策 
    25 define('HTML_REALDIR', rtrim(realpath(rtrim(realpath(dirname(__FILE__)), '/\\') . '/../'), '/\\') . '/'); 
     25$GLOBALS['_realdir'] = rtrim(realpath(rtrim(realpath(dirname(__FILE__)), '/\\') . '/../'), '/\\') . '/'; 
     26$GLOBALS['_realdir'] = str_replace('\\', '/', $GLOBALS['_realdir']); 
     27$GLOBALS['_realdir'] = str_replace('//', '/', $GLOBALS['_realdir']); 
     28define('HTML_REALDIR', $GLOBALS['_realdir']); 
    2629define('ADMIN_FUNCTION', true); 
    2730 
  • branches/version-2_13-dev/html/install/index.php

    r22968 r23370  
    2323// ▼require.php 相当 
    2424// rtrim は PHP バージョン依存対策 
    25 define('HTML_REALDIR', rtrim(realpath(rtrim(realpath(dirname(__FILE__)), '/\\') . '/../'), '/\\') . '/'); 
     25$GLOBALS['_realdir'] = rtrim(realpath(rtrim(realpath(dirname(__FILE__)), '/\\') . '/../'), '/\\') . '/'; 
     26$GLOBALS['_realdir'] = str_replace('\\', '/', $GLOBALS['_realdir']); 
     27$GLOBALS['_realdir'] = str_replace('//', '/', $GLOBALS['_realdir']); 
     28define('HTML_REALDIR', $GLOBALS['_realdir']); 
    2629 
    2730require_once HTML_REALDIR . 'define.php'; 
  • branches/version-2_13-dev/html/require.php

    r22206 r23370  
    2323 
    2424// rtrim は PHP バージョン依存対策 
    25 define('HTML_REALDIR', rtrim(realpath(rtrim(realpath(dirname(__FILE__)), '/\\') . '/'), '/\\') . '/'); 
     25$GLOBALS['_realdir'] = rtrim(realpath(rtrim(realpath(dirname(__FILE__)), '/\\') . '/'), '/\\') . '/'; 
     26$GLOBALS['_realdir'] = str_replace('\\', '/', $GLOBALS['_realdir']); 
     27$GLOBALS['_realdir'] = str_replace('//', '/', $GLOBALS['_realdir']); 
     28define('HTML_REALDIR', $GLOBALS['_realdir']); 
    2629 
    2730if (!defined('ADMIN_FUNCTION') || ADMIN_FUNCTION !== true) { 
Note: See TracChangeset for help on using the changeset viewer.