Skip to:
Content

Ticket #1136: bb_settings_patch_bbpress_1_0_v3.patch

File bb_settings_patch_bbpress_1_0_v3.patch, 1.1 KB (added by Jason_Jm, 8 years ago)

V3 Patch. Refactored and pretty.

  • bb-press/bb-settings.php

    # UTF8 Patch
    # - Jason Giedymin
     
    790790$bb->sitecookiepath = rtrim( trim( $bb->sitecookiepath ), " \t\n\r\0\x0B/" ) . '/'; 
    791791 
    792792$bb->wp_admin_cookie_path = bb_get_option( 'wp_admin_cookie_path' ); 
     793 
     794//Don't bother setting up if we're not integrating. 
    793795if ( !$bb->wp_admin_cookie_path && $bb->wp_cookies_integrated ) { 
    794         if ( $bb->wordpress_mu_primary_blog_id ) { 
    795                 $bb->wp_admin_cookie_path = $_bb_sitecookiepath; 
    796         } else { 
    797                 $bb->wp_admin_cookie_path = $_bb_sitecookiepath . '/wp-admin'; 
     796        $adminLocation = '/wp-admin'; //Where everyone wants to be 
     797 
     798        if ($_bb_sitecookiepath == '/') { //Handle root 
     799                $bb->wp_admin_cookie_path = $adminLocation; 
    798800        } 
     801        else { //must be a subdir! 
     802                $bb->wp_admin_cookie_path = $_bb_sitecookiepath . $adminLocation; 
    799803} 
     804} 
    800805$bb->wp_admin_cookie_path = rtrim( trim( $bb->wp_admin_cookie_path ), " \t\n\r\0\x0B/" ); 
    801806 
    802807$bb->wp_plugins_cookie_path = bb_get_option( 'wp_plugins_cookie_path' );