Changeset 8214 for trunk/wp-admin/admin-ajax.php
- Timestamp:
- 06/30/2008 12:04:22 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r8011 r8214 14 14 $s = $_GET['q']; // is this slashed already? 15 15 16 if ( strstr( $s, ',' ) ) 17 die; // it's a multiple tag insert, we won't find anything 18 $results = $wpdb->get_col( $wpdb->prepare("SELECT name FROM $wpdb->terms WHERE name LIKE (%s)", '%' . $s . '%') ); 16 if ( strstr( $s, ',' ) ) { 17 $s = explode( ',', $s ); 18 $s = $s[count( $s ) - 1]; 19 } 20 $s = trim( $s ); 21 if ( strlen( $s ) < 2 ) 22 die; // require 2 chars for matching 23 $results = $wpdb->get_col( "SELECT name FROM $wpdb->terms WHERE name LIKE ('%". $s . "%')" ); 19 24 echo join( $results, "\n" ); 20 25 die;
Note: See TracChangeset
for help on using the changeset viewer.