Make WordPress Core

Changeset 2680 for trunk/xmlrpc.php


Ignore:
Timestamp:
06/30/2005 04:07:42 PM (21 years ago)
Author:
ryan
Message:

Default category and pingback check fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r2676 r2680  
    1111
    1212$post_default_title = ""; // posts submitted via the xmlrpc interface get that title
    13 $post_default_category = 1; // posts submitted via the xmlrpc interface go into that category
    1413
    1514$xmlrpc_logging = 0;
    … …  
    564563              $post_category[] = get_cat_ID($cat);
    565564            }
    566           } else {
    567             $post_category[] = $post_default_category;
    568           }
     565          } else if ( !empty($catnames) ) {
     566                        $post_category = array(get_cat_ID($catnames));
     567                }
    569568               
    570569          // We've got all the data -- post it:
    … …  
    612611          $post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
    613612          $catnames = $content_struct['categories'];
     613
     614          $post_category = array();
    614615               
    615616          if (is_array($catnames)) {
    … …  
    617618              $post_category[] = get_cat_ID($cat);
    618619            }
    619           } else {
    620             $post_category[] = $post_default_category;
    621           }
     620          } else if ( !empty($catnames) ) {
     621                        $post_category = array(get_cat_ID($catnames));
     622                }
    622623
    623624          $post_excerpt = $content_struct['mt_excerpt'];
    … …  
    825826
    826827                global $wpdb;
    827                
     828
    828829          $blog_ID     = $wpdb->escape($args[0]);
    829830          $user_login  = $wpdb->escape($args[1]);
    … …  
    11941195                logIO("O","(PB) URI='$pagelinkedto' ID='$post_ID' Found='$way'");
    11951196
    1196                 $post = $wpdb->get_row("SELECT post_author FROM $wpdb->posts WHERE ID = '$post_ID'");
     1197                $post = get_post($post_ID);
    11971198
    11981199                if ( !$post ) // Post_ID not found
Note: See TracChangeset for help on using the changeset viewer.