# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: I:\Work\Projects\wordpress src\3.3.2\wp-admin\includes
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: class-wp-users-list-table.php
--- class-wp-users-list-table.php Base (BASE)
+++ class-wp-users-list-table.php Locally Modified (Based On LOCAL)
@@ -73,6 +73,8 @@
 			'total_items' => $wp_user_search->get_total(),
 			'per_page' => $users_per_page,
 		) );
+                
+                add_filter( 'user_role_name', array( &$this, 'wp_user_role_name' ), 1, 2 );
 	}
 
 	function no_items() {
@@ -141,10 +143,15 @@
 ?>
 	<div class="alignleft actions">
 		<label class="screen-reader-text" for="new_role"><?php _e( 'Change role to&hellip;' ) ?></label>
-		<select name="new_role" id="new_role">
-			<option value=''><?php _e( 'Change role to&hellip;' ) ?></option>
-			<?php wp_dropdown_roles(); ?>
-		</select>
+		<?php
+                // print the full list of roles with the primary one selected.
+                wp_user_role_selector(array(
+                    'no_role' => false,
+                    'id' => 'new_role',
+                    'name' => 'new_role',
+                    'before_list' => "<option value=''>" . _e( 'Change role to&hellip;' ) . "</option>",
+                ));
+                ?>
 		<?php submit_button( __( 'Change' ), 'secondary', 'changeit', false ); ?>
 	</div>
 <?php
@@ -193,8 +200,6 @@
 
 		$style = '';
 		foreach ( $this->items as $userid => $user_object ) {
-			$role = reset( $user_object->roles );
-
 			if ( is_multisite() && empty( $role ) )
 				continue;
 
@@ -209,9 +214,9 @@
 	 * @since 2.1.0
 	 *
 	 * @param object $user_object
-	 * @param string $style Optional. Attributes added to the TR element. Must be sanitized.
+	 * @param string $style Optional. Attributes added to the TR element.  Must be sanitized.
 	 * @param string $role Key for the $wp_roles array.
-	 * @param int $numposts Optional. Post count to display for this user. Defaults to zero, as in, a new user has made zero posts.
+	 * @param int $numposts Optional. Post count to display for this user.  Defaults to zero, as in, a new user has made zero posts.
 	 * @return string
 	 */
 	function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) {
@@ -261,7 +266,13 @@
 		} else {
 			$edit = '<strong>' . $user_object->user_login . '</strong>';
 		}
-		$role_name = isset( $wp_roles->role_names[$role] ) ? translate_user_role( $wp_roles->role_names[$role] ) : __( 'None' );
+		
+                if ( !isset( $role ) || $role == '' )
+                    $role = $user_object->roles;
+                if ( !is_array($role) )
+                    $role = array( $role );
+		$role_name = apply_filters( 'user_role_name' , $role, $role );
+                
 		$avatar = get_avatar( $user_object->ID, 32 );
 
 		$r = "<tr id='user-$user_object->ID'$style>";
@@ -315,4 +326,17 @@
 
 		return $r;
 	}
+        
+        /**
+         * Formats the role name for the WP_Users_List table role column.
+         * 
+         * @param type string $role the string that is being filtered.
+         * @param type array $roles the array of roles
+         * @return type string
+         */
+        static function wp_user_role_name( $role, $roles ) {
+            global $wp_roles;
+            return isset( $wp_roles->role_names[$roles[0]] ) ? translate_user_role( $wp_roles->role_names[$roles[0]] ) : __( 'None' );
 }
+        
+}
\ No newline at end of file
