- Timestamp:
- Nov 20, 2009, 12:46:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/include/xpress_block_render.php
r394 r448 137 137 } 138 138 139 function get_block_file_path($mydirname,$file_name)140 {141 global $xoops_config;142 $mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname;143 $select_theme = get_xpress_theme_name($mydirname);144 $block_file = $mydirpath . '/wp-content/themes/' . $select_theme . '/blocks/' . $file_name;145 146 if (!file_exists($block_file))147 $block_file = $xoops_config->xoops_root_path . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/' . $file_name;148 return $block_file;149 }150 139 151 140 function xpress_block_cache_found($mydirname,$block_name) … … 184 173 if (strstr($call_url,$this_url)){ 185 174 $block_theme_file = get_block_file_path($mydirname,$inc_theme_file_name); 186 require_once $block_theme_file ;175 require_once $block_theme_file['file_path']; 187 176 $block = $call_theme_function_name($options); //The block name and the called function name should be assumed to be the same name. 177 if (!empty($block_theme_file['error'])) 178 $block['err_message'] = $block_theme_file['error']; 188 179 } else { 189 180 if (xpress_block_cache_found($mydirname,$cache_title. $blockID)){ … … 227 218 228 219 $block_theme_file = get_block_file_path($mydirname,$inc_theme_file_name); 229 require_once $block_theme_file ;220 require_once $block_theme_file['file_path']; 230 221 $render = $call_theme_function_name($options); //The block name and the called function name should be assumed to be the same name. 231 222 $render_array['block'] = $render; 232 223 $render_array['block']['options'] = $block->options; 224 if (!empty($block_theme_file['error'])) 225 $render_array['block']['err_message'] = $block_theme_file['error']; 233 226 if (xpress_block_cache_found($mydirname,$cache_title. $blockID)){ 234 227 $render_serialize = xpress_XML_serialize($render_array); … … 295 288 } 296 289 } 297 290 298 291 } 299 292 ?>
Note: See TracChangeset
for help on using the changeset viewer.