XPressME Integration Kit

Trac

Changeset 657


Ignore:
Timestamp:
Sep 17, 2010, 11:13:52 AM (14 years ago)
Author:
toemon
Message:

cube2.2よりcacheディレクトリがtrust_path側へ移ったことへの対応 Fixes#373

Location:
trunk/xpressme_integration_kit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/class/config_from_xoops.class.php

    r614 r657  
    2020        var $xoops_url; 
    2121        var $xoops_trust_path; 
     22        var $xoops_cache_path; 
    2223        var $xoops_db_prefix; 
    2324        var $xoops_db_name; 
     
    101102                        $this->xoops_time_zone = date_default_timezone_get(); 
    102103                } 
     104                $this->_get_cache_path(); 
    103105    } 
    104106 
     
    253255                        if(defined('XOOPS_SALT')) $this->xoops_salt = XOOPS_SALT; else $this->xoops_salt = ''; 
    254256                } // end of if file_exists 
    255         }        
     257        } 
     258         
     259        // call after the $this->xoops_trust_path is set 
     260        function _get_cache_path(){ 
     261                $cache_path = $this->xoops_trust_path . '/cache'; 
     262                if (file_exists($cache_path) && is_writable($cache_path)){ 
     263                        $this->xoops_cache_path = $cache_path; 
     264                        return; 
     265                } 
     266                $this->xoops_cache_path = $this->xoops_root_path . '/cache'; 
     267        } 
    256268     
    257269    function get_xoops_mainfile_path(){ 
  • trunk/xpressme_integration_kit/include/xpress_block_render.php

    r656 r657  
    122122    { 
    123123        global $xoops_config; 
    124         if(defined('XOOPS_ROOT_PATH')){ 
    125                 $cache_dir = XOOPS_ROOT_PATH . '/cache/'; 
    126         } else { 
    127                 $cache_dir = $xoops_config->xoops_root_path . '/cache/'; 
    128         } 
     124         
     125                $cache_dir = $xoops_config->xoops_cache_path . '/'; 
    129126        $xml_name = $block_name . '.xml'; 
    130127 
     
    280277                $pattern = '(' . $pattern . ')'; 
    281278                 
    282                 $cache_dir = $xoops_config->xoops_root_path . '/cache/'; 
     279                $cache_dir = $xoops_config->xoops_cache_path . '/'; 
    283280                $cache_time = 0; 
    284281        if ($dh = opendir($cache_dir)) { 
  • trunk/xpressme_integration_kit/include/xpress_cache.php

    r96 r657  
    1818    { 
    1919        global $xoops_config; 
    20         if(defined('XOOPS_ROOT_PATH')){ 
    21                 $cache_dir = XOOPS_ROOT_PATH . '/cache/'; 
    22         } else { 
    23                 $cache_dir = $xoops_config->xoops_root_path . '/cache/'; 
    24         } 
     20         
     21        $cache_dir = $xoops_config->xoops_cache_path . '/'; 
    2522        $filename = $cache_dir .$mydirname . '_' . $collation_key; 
    2623        if (xpress_cache_found($filename)) { 
     
    3633    { 
    3734                global $xoops_config; 
    38                 $cache_dir = $xoops_config->xoops_root_path . '/cache/'; 
     35                $cache_dir = $xoops_config->xoops_cache_path . '/'; 
    3936                $cache_time = 0; 
    4037 
     
    5350    { 
    5451                global $xoops_config; 
    55                 $cache_dir = $xoops_config->xoops_root_path . '/cache/'; 
     52                $cache_dir = $xoops_config->xoops_cache_path . '/'; 
    5653                $cache_time = 0; 
    5754        if ($dh = opendir($cache_dir)) { 
Note: See TracChangeset for help on using the changeset viewer.