- Timestamp:
- 11/03/2010 06:28:02 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-ms-sites-list-table.php
r16161 r16166 46 46 $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' "; 47 47 48 if ( isset( $_REQUEST['searchaction'] ) ) { 49 if ( 'name' == $_REQUEST['searchaction'] ) { 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 } 59 } elseif ( 'id' == $_REQUEST['searchaction'] ) { 60 $query .= " AND {$wpdb->blogs}.blog_id = '{$like_s}' "; 61 } elseif ( 'ip' == $_REQUEST['searchaction'] ) { 62 $query = "SELECT * 63 FROM {$wpdb->blogs}, {$wpdb->registration_log} 64 WHERE site_id = '{$wpdb->siteid}' 65 AND {$wpdb->blogs}.blog_id = {$wpdb->registration_log}.blog_id 66 AND {$wpdb->registration_log}.IP LIKE ( '%{$like_s}%' )"; 48 if ( empty($s) ) { 49 // Nothing to do. 50 } elseif ( false !== strpos($s, '.') ) { 51 // IP address 52 $query = "SELECT * 53 FROM {$wpdb->blogs}, {$wpdb->registration_log} 54 WHERE site_id = '{$wpdb->siteid}' 55 AND {$wpdb->blogs}.blog_id = {$wpdb->registration_log}.blog_id 56 AND {$wpdb->registration_log}.IP LIKE ( '{$like_s}%' )"; 57 } else { 58 if ( is_subdomain_install() ) { 59 $blog_s = str_replace( '.' . $current_site->domain, '', $like_s ); 60 $blog_s .= '.' . $current_site->domain; 61 $query .= " AND ( {$wpdb->blogs}.domain LIKE '$blog_s' "; 62 } else { 63 if ( $like_s != trim('/', $current_site->path) ) 64 $blog_s = $current_site->path .= $like_s . '/'; 65 else 66 $blog_s = $like_s; 67 $query .= " AND ( {$wpdb->blogs}.path LIKE '$blog_s' "; 67 68 } 69 70 if ( is_numeric($s) ) 71 $query .= " OR {$wpdb->blogs}.blog_id = '{$like_s}' "; 72 73 $query .= ' )'; 68 74 } 69 75
Note: See TracChangeset
for help on using the changeset viewer.