Replace all uses of like_escape() with $wpdb->esc_like().

Props miqrogroove.
See #10041.


git-svn-id: https://develop.svn.wordpress.org/trunk@28712 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-06-10 00:43:32 +00:00
parent 2a551f57a4
commit 84ad12b439
19 changed files with 122 additions and 76 deletions
+1 -1
View File
@@ -5764,7 +5764,7 @@ class wp_xmlrpc_server extends IXR_Server {
} elseif ( is_string($urltest['fragment']) ) {
// ...or a string #title, a little more complicated
$title = preg_replace('/[^a-z0-9]/i', '.', $urltest['fragment']);
$sql = $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_title RLIKE %s", like_escape( $title ) );
$sql = $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_title RLIKE %s", $title );
if (! ($post_ID = $wpdb->get_var($sql)) ) {
// returning unknown error '0' is better than die()ing
return $this->pingback_error( 0, '' );