XPressME Integration Kit

Trac


Ignore:
Timestamp:
Mar 6, 2009, 5:16:22 PM (15 years ago)
Author:
toemon
Message:

途中経過でインストール、アップデートできなくなってしまっていたバグ修正
イベント通知の部分をFix、(ゲストのモジュールアクセス権限がないと通知できないのは直らない)
ブロックのキャッシュを見直し、キャッシュがない場合と、ブロックオプションが変更された場合にリフレッシュする機能を追加
ブロックキャッシュの更新にてポスト削除時のイベントをDB削除前にとっていたバグを修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/xpress_cache.php

    r95 r96  
    11<?php 
    22         
     3if(!function_exists("xpress_cache_found")): 
     4    function xpress_cache_found($filename) 
     5    { 
     6                $cache_time = 0; 
     7//        if (file_exists($filename) && ((time() - filemtime($filename)) < $cache_time)) { 
     8        if (file_exists($filename)) { 
     9            return true; 
     10       } else { 
     11                        return false; 
     12                } 
     13    }  
     14endif; 
     15 
    316if(!function_exists("xpress_cache_read")): 
    417    function xpress_cache_read($mydirname,$collation_key) 
    518    { 
    619        global $xoops_config; 
    7                 $cache_dir = $xoops_config->xoops_root_path . '/cache/'; 
    8                 $cache_time = 0; 
     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        } 
    925        $filename = $cache_dir .$mydirname . '_' . $collation_key; 
    10 //        if (file_exists($filename) && ((time() - filemtime($filename)) < $cache_time)) { 
    11         if (file_exists($filename)) { 
     26        if (xpress_cache_found($filename)) { 
    1227            return file_get_contents($filename); 
    1328       } else { 
Note: See TracChangeset for help on using the changeset viewer.