Changeset 229
- Timestamp:
- May 23, 2009, 2:44:21 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/xpress_render.php
r202 r229 116 116 } 117 117 118 //PHP_SELF and GET are remake for the XOOPS event notification. 119 function xpress_remake_global_for_permlink(){ 120 global $wp_db,$wp_query; 121 $php_self = $_SERVER['PHP_SELF']; 122 $get = $_GET; 123 124 if (preg_match('/\/$/',$php_self) && !preg_match('/index.php/',$php_self)) { 125 $php_self = $php_self . 'index.php'; 126 $_SERVER['PHP_SELF'] = $php_self; 127 } 128 if (empty($_GET)){ 129 $query_vars = $wp_query->query_vars; 130 $post = $wp_query->post; 131 if ($wp_query->is_single) { 132 $_GET = array('p'=>$post->ID); 133 } else if($wp_query->is_category){ 134 $_GET = array('cat'=>$query_vars['cat']); 135 } else if($wp_query->is_author){ 136 $_GET = array('author'=>$query_vars['author']); 137 } 138 } 139 } 140 118 141 //rendering for the module header and the body 119 142 function xpress_render($contents){ 120 143 global $xoops_config , $xoopsTpl,$xpress_config; 144 xpress_remake_global_for_permlink(); 121 145 $mydirname = basename(dirname(dirname(__FILE__))); 122 146 include $xoops_config->xoops_root_path ."/header.php";
Note: See TracChangeset
for help on using the changeset viewer.