XPressME Integration Kit

Trac

Changeset 41


Ignore:
Timestamp:
Dec 23, 2008, 1:23:59 AM (15 years ago)
Author:
toemon
Message:

ブロック複製時でも、モジュール外に配置した場合、同一キャッシュを使用し同じ結果を表示してしまうバグを修正。
ブロックのshow_func内でブロックIDを取得する方法がわからないので、ブロックオプションから、識別コードを取得して、キャッシュのIDとする。

コメントブロックオプション(コメントタイプの選択)が有効にならないバグ修正

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/blocks/xpress_block_recent_comments.php

    r38 r41  
    2020                $disp_count = empty( $options[1] ) ? '10' : $options[1] ; 
    2121                $disp_length = empty( $options[2] ) ? '30' : $options[2] ; 
    22             $selected = array_slice($options,5); // get allowed cats 
    23                 $this_template = empty( $options[6] ) ? 'db:'.$mydirname.'_block_comments.html' : trim( $options[4] ); 
     22            $selected = array_slice($options,3); // get allowed cats 
     23                $this_template = empty( $options[4] ) ? 'db:'.$mydirname.'_block_comments.html' : trim( $options[4] ); 
    2424                $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
    2525 
     
    6060        { 
    6161                $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
     62                $disp_count = empty( $options[1] ) ? '10' : $options[1] ; 
     63                $disp_length = empty( $options[2] ) ? '30' : $options[2] ; 
     64                $selected = array_slice($options,3); // get allowed cats 
     65                 
    6266                $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
     67                 
     68                $Identification = '-' . $disp_count . '-' . $disp_length ; 
     69                foreach ($selected as $item){ 
     70                        $Identification .= '-' . $item ; 
     71                } 
    6372 
    6473                global $wpdb; 
     
    7382                         
    7483                        require_once $mydirpath.'/include/xoops_block_cache.php'; 
    75                         xpress_block_cache_write($mydirname,'recent_comments_block',$block); 
     84                        xpress_block_cache_write($mydirname,'recent_comments_block'. $Identification,$block); 
    7685                } else { 
    7786                        require_once $mydirpath.'/include/xoops_block_cache.php'; 
    78                         $block = xpress_block_cache_read($mydirname,'recent_comments_block'); 
     87                        $block = xpress_block_cache_read($mydirname,'recent_comments_block'. $Identification); 
    7988                } 
    8089                return  $block; 
  • trunk/wp-content/themes/xpress_default/blocks/recent_comments_block.php

    r38 r41  
    77        $disp_count = empty( $options[1] ) ? '10' : $options[1] ; 
    88        $disp_length = empty( $options[2] ) ? '30' : $options[2] ; 
    9         $selected = array_slice($options,5); // get allowed cats 
    10         $this_template = empty( $options[6] ) ? 'db:'.$mydirname.'_block_comments.html' : trim( $options[4] ); 
     9        $selected = array_slice($options,3); // get allowed cats 
     10        $this_template = empty( $options[4] ) ? 'db:'.$mydirname.'_block_comments.html' : trim( $options[4] ); 
    1111        $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
    1212         
Note: See TracChangeset for help on using the changeset viewer.