Changeset 236 for trunk/xpressme_integration_kit
- Timestamp:
- May 26, 2009, 3:19:43 PM (16 years ago)
- Location:
- trunk/xpressme_integration_kit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
r232 r236 235 235 } 236 236 237 function xpress_set_author_cookie() 238 { 237 function xpress_set_author_cookie($query_vars) 238 { 239 global $wp , $wpdb; 239 240 $author_cookie = get_xpress_dir_name() . "_select_author" ; 240 241 if(xpress_is_multi_user()){ 241 if (empty($_GET)){ 242 // $GLOBALS["wp_xoops_author"] = null; 243 setcookie($author_cookie, 0); 244 $_COOKIE[$author_cookie] = 0; 245 246 } else { 242 if (!empty($_GET)){ 247 243 $auth = intval( @$_GET["author"] ); 248 244 if ($auth > 0){ 249 setcookie($author_cookie, $auth );245 setcookie($author_cookie, $auth, time()+3600, COOKIEPATH); 250 246 $_COOKIE[$author_cookie] = $auth; 251 247 } 248 } else { 249 if (!empty($wp->query_vars) ){ 250 if (!empty($wp->query_vars['author_name']) ){ 251 $author_name = $wp->query_vars['author_name']; 252 $auth = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_login = '$author_name'"); 253 254 setcookie($author_cookie, $auth, time()+3600, COOKIEPATH); 255 $_COOKIE[$author_cookie] = $auth; 256 } 257 } else { 258 setcookie($author_cookie, 0, time()+3600, COOKIEPATH); 259 $_COOKIE[$author_cookie] = 0; 260 } 252 261 } 253 262 }else{ 254 263 // $GLOBALS["wp_xoops_author"] = null; 255 setcookie($author_cookie, 0 );264 setcookie($author_cookie, 0, time()+3600, COOKIEPATH); 256 265 $_COOKIE[$author_cookie] = 0; 257 266 } 267 return $query_vars; 258 268 } 259 269 -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
r232 r236 81 81 // Query filter for MultiUser 82 82 add_filter('query','xpress_query_filter'); 83 add_action("init", "xpress_set_author_cookie"); 83 //add_action("init", "xpress_set_author_cookie"); 84 add_filter('request', 'xpress_set_author_cookie'); 84 85 85 86 // SQL debug windows -
trunk/xpressme_integration_kit/xoops_version.php
r232 r236 40 40 41 41 // status 42 $modversion['codename'] = "RC2(r23 1)";42 $modversion['codename'] = "RC2(r236)"; 43 43 44 44 // onInstall, onUpdate, onUninstall
Note: See TracChangeset
for help on using the changeset viewer.