Changeset 16161
- Timestamp:
- 11/03/2010 01:57:43 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-ms-sites-list-table.php
r16158 r16161 22 22 23 23 function prepare_items() { 24 global $s, $mode, $wpdb ;24 global $s, $mode, $wpdb, $current_site; 25 25 26 26 $mode = ( empty( $_REQUEST['mode'] ) ) ? 'list' : $_REQUEST['mode']; … … 48 48 if ( isset( $_REQUEST['searchaction'] ) ) { 49 49 if ( 'name' == $_REQUEST['searchaction'] ) { 50 $query .= " AND ( {$wpdb->blogs}.domain LIKE '%{$like_s}%' OR {$wpdb->blogs}.path LIKE '%{$like_s}%' ) "; 50 if ( is_subdomain_install() ) { 51 $like_s = str_replace( '.' . $current_site->domain, '', $like_s ); 52 $like_s .= '.' . $current_site->domain; 53 $query .= " AND {$wpdb->blogs}.domain LIKE '$like_s' "; 54 } else { 55 if ( $like_s != trim('/', $current_site->path) ) 56 $like_s = $current_site->path .= $like_s . '/'; 57 $query .= " AND {$wpdb->blogs}.path LIKE '$like_s' "; 58 } 51 59 } elseif ( 'id' == $_REQUEST['searchaction'] ) { 52 60 $query .= " AND {$wpdb->blogs}.blog_id = '{$like_s}' ";
Note: See TracChangeset
for help on using the changeset viewer.