Make WordPress Core

Changeset 6238


Ignore:
Timestamp:
10/13/2007 12:54:26 AM (17 years ago)
Author:
markjaquith
Message:

Remove redundant "db_" from db_insert() and db_update() methods. Now just insert() and update(). see #5178

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r6237 r6238  
    705705
    706706    if ($update) {
    707         $wpdb->db_update( $wpdb->posts, $data, 'ID', $post_ID );
     707        $wpdb->update( $wpdb->posts, $data, 'ID', $post_ID );
    708708    } else {
    709709        $data['post_mime_type'] = stripslashes( $post_mime_type ); // This isn't in the update
    710         $wpdb->db_insert( $wpdb->posts, $data );
     710        $wpdb->insert( $wpdb->posts, $data );
    711711        $post_ID = (int) $wpdb->insert_id;
    712712    }
     
    12951295
    12961296    if ($update) {
    1297         $wpdb->db_update($wpdb->posts, $data, 'ID', $post_ID);
    1298     } else {
    1299         $wpdb->db_insert($wpdb->posts, $data);
     1297        $wpdb->update($wpdb->posts, $data, 'ID', $post_ID);
     1298    } else {
     1299        $wpdb->insert($wpdb->posts, $data);
    13001300        $post_ID = (int) $wpdb->insert_id;
    13011301    }
  • trunk/wp-includes/wp-db.php

    r6236 r6238  
    257257     * @return mixed results of $this->query()
    258258     */
    259     function db_insert($table, $data) {
     259    function insert($table, $data) {
    260260        $data = add_magic_quotes($data);
    261261        $fields = array_keys($data);
     
    271271     * @return mixed results of $this->query()
    272272     */
    273     function db_update($table, $data, $where_col, $where_val){
     273    function update($table, $data, $where_col, $where_val){
    274274        $data = add_magic_quotes($data);
    275275        $bits = array();
Note: See TracChangeset for help on using the changeset viewer.