]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/class-wp-users-list-table.php
Wordpress 3.2
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-users-list-table.php
index d52d75f09200fc67149d00793a14e3a77dca5c51..de22748be82e4b33418ff87b5d0b1397ffefa381 100644 (file)
@@ -12,14 +12,14 @@ class WP_Users_List_Table extends WP_List_Table {
        var $site_id;
        var $is_site_users;
 
-       function WP_Users_List_Table() {
+       function __construct() {
                $screen = get_current_screen();
                $this->is_site_users = 'site-users-network' == $screen->id;
 
                if ( $this->is_site_users )
                        $this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
 
-               parent::WP_List_Table( array(
+               parent::__construct( array(
                        'singular' => 'user',
                        'plural'   => 'users'
                ) );
@@ -52,7 +52,8 @@ class WP_Users_List_Table extends WP_List_Table {
                        'fields' => 'all_with_meta'
                );
 
-               $args['search'] = '*' . $args['search'] . '*';
+               if ( '' !== $args['search'] )
+                       $args['search'] = '*' . $args['search'] . '*';
 
                if ( $this->is_site_users )
                        $args['blog_id'] = $this->site_id;
@@ -112,7 +113,7 @@ class WP_Users_List_Table extends WP_List_Table {
                        $name = translate_user_role( $name );
                        /* translators: User role name with count */
                        $name = sprintf( __('%1$s <span class="count">(%2$s)</span>'), $name, $avail_roles[$this_role] );
-                       $role_links[$this_role] = "<a href='" . add_query_arg( 'role', $this_role, $url ) . "'$class>$name</a>";
+                       $role_links[$this_role] = "<a href='" . esc_url( add_query_arg( 'role', $this_role, $url ) ) . "'$class>$name</a>";
                }
 
                return $role_links;