Make WordPress Core

Ticket #16617: capabilities_patch.diff

File capabilities_patch.diff, 608 bytes (added by jrfoell, 14 years ago)
  • wp-includes/capabilities.php

     
    100100                global $wpdb, $wp_user_roles;
    101101                $this->role_key = $wpdb->prefix . 'user_roles';
    102102                if ( ! empty( $wp_user_roles ) ) {
    103                         $this->roles = $wp_user_roles;
    104103                        $this->use_db = false;
    105104                } else {
    106                         $this->roles = get_option( $this->role_key );
     105                        $wp_user_roles = get_option( $this->role_key );
    107106                }
     107                $this->roles = &$wp_user_roles;
    108108
    109109                if ( empty( $this->roles ) )
    110110                        return;