XPressME Integration Kit

Trac

Changeset 455


Ignore:
Timestamp:
Nov 24, 2009, 3:51:16 PM (14 years ago)
Author:
toemon
Message:

XOOPS側でのRewriteRule 適応時のブロック更新が行われないバグ修正 Fixes #250

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/include/xpress_block_render.php

    r448 r455  
    160160        function xpress_block_render($mydirname,$block_function_name,$options) 
    161161        { 
    162                 global $wpdb; 
     162                global $wpdb,$xoops_config; 
    163163                $func_file = $block_function_name; 
    164164                $call_theme_function_name = str_replace(".php", "", $block_function_name); 
     
    167167                $blockID =get_block_id($mydirname,$func_file,$options);          
    168168 
    169                 $this_url = '/modules/'. $mydirname; 
     169                $this_url = str_replace( $xoops_config->xoops_url , '' , get_option('home')); 
    170170                $call_url = $_SERVER['REQUEST_URI']; 
    171                  
    172171                xpress_block_css_set($mydirname); 
    173                 if (strstr($call_url,$this_url)){                        
     172                if (strstr($call_url,$this_url)){        
    174173                        $block_theme_file = get_block_file_path($mydirname,$inc_theme_file_name); 
    175174                        require_once $block_theme_file['file_path']; 
     
    185184                        } 
    186185                } 
    187  
    188                 $templates_file = 'db:'.$mydirname. '_' . str_replace(".php", ".html", $block_function_name); 
     186                $option = explode('|' , $block['options']); 
     187                 
     188                if (isset($option[1])) 
     189                        $templates_file = $option[1]; 
     190                else 
     191                        $templates_file = 'db:'.$mydirname. '_' . str_replace(".php", ".html", $block_function_name); 
    189192                $tpl =& new XoopsTpl() ; 
    190193                $tpl->assign( 'block' , $block ) ; 
Note: See TracChangeset for help on using the changeset viewer.