mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Use wpdb::insert() and update(). see #6836
git-svn-id: https://develop.svn.wordpress.org/trunk@10731 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -216,7 +216,7 @@ case 'approvecomment' :
|
||||
case 'editedcomment' :
|
||||
|
||||
$comment_id = absint( $_POST['comment_ID'] );
|
||||
$comment_post_id = absint( $_POST['comment_post_id'] );
|
||||
$comment_post_id = absint( $_POST['comment_post_ID'] );
|
||||
|
||||
check_admin_referer( 'update-comment_' . $comment_id );
|
||||
|
||||
|
||||
@@ -47,10 +47,10 @@ if ( $response['response']['code'] != 200 )
|
||||
$body = str_replace(array("\r\n", "\r"), "\n", $response['body']);
|
||||
$returns = explode("\n", $body);
|
||||
|
||||
foreach ($returns as $return) :
|
||||
foreach ($returns as $return) {
|
||||
$time = substr($return, 0, 19);
|
||||
$uri = preg_replace('/(.*?) | (.*?)/', '$2', $return);
|
||||
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->links SET link_updated = %s WHERE link_url = %s", $time, $uri) );
|
||||
endforeach;
|
||||
$wdpdb->update( $wpdb->links, array('link_updated' => $time), array('link_url' => $uri) );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user