Ticket #5580: admin-ajax.php.diff
File admin-ajax.php.diff, 650 bytes (added by , 17 years ago) |
---|
-
admin-ajax.php
13 13 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( "SELECT name FROM $wpdb->terms WHERE name LIKE ('%$s%')" ); 16 if ( strstr( $s, ',' ) ) { 17 $s = explode( ',', $s ); 18 $s = $s[count( $s ) - 1]; 19 } 20 $results = $wpdb->get_col( "SELECT name FROM $wpdb->terms WHERE name LIKE ('%". trim($s) . "%')" ); 19 21 echo join( $results, "\n" ); 20 22 die; 21 23 }