Make WordPress Core


Ignore:
Timestamp:
04/14/2008 04:13:25 PM (17 years ago)
Author:
ryan
Message:

Prepare DB queries in more places. Props filosofo. see #6644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/update-links.php

    r5843 r7645  
    3737
    3838    foreach ($returns as $return) :
    39         $time = $wpdb->escape( substr($return, 0, 19) );
    40         $uri = $wpdb->escape( preg_replace('/(.*?) | (.*?)/', '$2', $return) );
    41         $wpdb->query("UPDATE $wpdb->links SET link_updated = '$time' WHERE link_url = '$uri'");
     39        $time = substr($return, 0, 19);
     40        $uri = preg_replace('/(.*?) | (.*?)/', '$2', $return);
     41        $wpdb->query( $wpdb->prepare("UPDATE $wpdb->links SET link_updated = %s WHERE link_url = %s", $time, $uri) );
    4242    endforeach;
    4343}
Note: See TracChangeset for help on using the changeset viewer.