Ticket #2512: alternate_options_table.diff
File alternate_options_table.diff, 1.3 KB (added by , 19 years ago) |
---|
-
wp-includes/capabilities.php
13 13 14 14 $this->roles = get_option($this->role_key); 15 15 16 if ( empty($this->roles) ) 17 return; 16 if ( empty($this->roles) ) { 17 if ( $table_prefix != substr($wpdb->options, 0, strlen($wpdb->options) - 7) ) { 18 // we're using a custom options table, but our roles are set in the normal options table 19 $this->roles = $wpdb->get_var("SELECT option_value FROM" . $tableprefix . "options WHERE option_name = '$this->role_key'"); 20 } 21 if ( empty($this->roles) ) 22 return; 23 } 18 24 19 25 foreach ($this->roles as $role => $data) { 20 26 $this->role_objects[$role] = new WP_Role($role, $this->roles[$role]['capabilities']); -
wp-settings.php
91 91 $wpdb->users = CUSTOM_USER_TABLE; 92 92 if ( defined('CUSTOM_USER_META_TABLE') ) 93 93 $wpdb->usermeta = CUSTOM_USER_META_TABLE; 94 if ( defined('CUSTOM_OPTIONS_TABLE') ) 95 $wpdb->options = CUSTOM_OPTIONS_TABLE; 94 96 95 97 // We're going to need to keep this around for a few months even though we're not using it internally 96 98