XPressME Integration Kit

Trac

Changeset 123


Ignore:
Timestamp:
Mar 19, 2009, 8:49:19 PM (15 years ago)
Author:
toemon
Message:

コメント部のログアウトを実行すると、ログアウト後、もとのページに戻ると、XOOSユーザとしてはログアウトしていないので、再びログインしてしまうバグ?を修正
コメントのログアウト時も、XOOPSログアウトへリダイレクトするようにした。

Location:
trunk/wp-content
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/plugins/xpressme/include/pluggable-override.php

    r114 r123  
    164164if ( !function_exists('wp_redirect') ) : 
    165165function wp_redirect($location, $status = 302) { 
    166         global $is_IIS,$xoops_config; 
     166        global $is_IIS,$xoops_config,$action; 
    167167         
    168168        if ($location == 'wp-login.php?loggedout=true') $location = $xoops_config->xoops_url.'/user.php?op=logout'; //xoops logout at wp logout 
    169169        if ($location == 'wp-login.php?action=register') $location = $xoops_config->xoops_url."/register.php";  //wp-register to xoops register 
     170        if ($action == 'logout') $location = $xoops_config->xoops_url.'/user.php?op=logout'; //xoops logout at comment logout 
    170171 
    171172        $location = apply_filters('wp_redirect', $location, $status); 
  • trunk/wp-content/themes/xpress_default/comments.php

    r64 r123  
    8888                                <?php if ( $user_ID ) : ?> 
    8989 
    90                                         <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account', 'xpress'); ?>"><?php _e('Log out &raquo;', 'xpress'); ?></a></p> 
     90                                        <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'xpress'); ?>"><?php _e('Log out &raquo;', 'xpress'); ?></a></p> 
    9191 
    9292                                <?php else : ?> 
Note: See TracChangeset for help on using the changeset viewer.