Changeset 16824
- Timestamp:
- 12/08/2010 10:00:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-xmlrpc-server.php
r16802 r16824 1259 1259 $comment['comment_parent'] = isset($content_struct['comment_parent']) ? absint($content_struct['comment_parent']) : 0; 1260 1260 1261 $comment['comment_content'] = $content_struct['content'];1261 $comment['comment_content'] = isset($content_struct['content']) ? $content_struct['content'] : null; 1262 1262 1263 1263 do_action('xmlrpc_call', 'wp.newComment'); … … 2180 2180 } 2181 2181 2182 $post_title = $content_struct['title'];2183 $post_content = $content_struct['description'];2182 $post_title = isset( $content_struct['title'] ) ? $content_struct['title'] : null; 2183 $post_content = isset( $content_struct['description'] ) ? $content_struct['description'] : null; 2184 2184 2185 2185 $post_status = $publish ? 'publish' : 'draft'; … … 2203 2203 } 2204 2204 2205 $post_excerpt = $content_struct['mt_excerpt'];2206 $post_more = $content_struct['mt_text_more'];2207 2208 $tags_input = $content_struct['mt_keywords'];2205 $post_excerpt = isset($content_struct['mt_excerpt']) ? $content_struct['mt_excerpt'] : null; 2206 $post_more = isset($content_struct['mt_text_more']) ? $content_struct['mt_text_more'] : null; 2207 2208 $tags_input = isset($content_struct['mt_keywords']) ? $content_struct['mt_keywords'] : null; 2209 2209 2210 2210 if ( isset($content_struct["mt_allow_comments"]) ) { … … 2272 2272 $post_content = $post_content . "<!--more-->" . $post_more; 2273 2273 2274 $to_ping = $content_struct['mt_tb_ping_urls']; 2275 if ( is_array($to_ping) ) 2276 $to_ping = implode(' ', $to_ping); 2274 $to_ping = null; 2275 if ( isset( $content_struct['mt_tb_ping_urls'] ) ) { 2276 $to_ping = $content_struct['mt_tb_ping_urls']; 2277 if ( is_array($to_ping) ) 2278 $to_ping = implode(' ', $to_ping); 2279 } 2277 2280 2278 2281 // Do some timestamp voodoo … … 2290 2293 } 2291 2294 2292 $catnames = $content_struct['categories'];2293 logIO('O', 'Post cats: ' . var_export($catnames,true));2294 2295 $post_category = array(); 2295 2296 if ( is_array($catnames) ) { 2297 foreach ($catnames as $cat) { 2298 $post_category[] = get_cat_ID($cat); 2296 if ( isset( $content_struct['categories'] ) ) { 2297 $catnames = $content_struct['categories']; 2298 logIO('O', 'Post cats: ' . var_export($catnames,true)); 2299 2300 if ( is_array($catnames) ) { 2301 foreach ($catnames as $cat) { 2302 $post_category[] = get_cat_ID($cat); 2303 } 2299 2304 } 2300 2305 } … … 2322 2327 2323 2328 // Handle enclosures 2324 $this->add_enclosure_if_new($post_ID, $content_struct['enclosure']); 2329 $thisEnclosure = isset($content_struct['enclosure']) ? $content_struct['enclosure'] : null; 2330 $this->add_enclosure_if_new($post_ID, $thisEnclosure); 2325 2331 2326 2332 $this->attach_uploads( $post_ID, $post_content ); … … 2550 2556 } 2551 2557 2552 $post_title = $content_struct['title']; 2553 $post_content = $content_struct['description']; 2554 $catnames = $content_struct['categories']; 2558 $post_title = isset( $content_struct['title'] ) ? $content_struct['title'] : null; 2559 $post_content = isset( $content_struct['description'] ) ? $content_struct['description'] : null; 2555 2560 2556 2561 $post_category = array(); 2557 2558 if ( is_array($catnames) ) { 2559 foreach ($catnames as $cat) { 2560 $post_category[] = get_cat_ID($cat); 2562 if ( isset( $content_struct['categories'] ) ) { 2563 $catnames = $content_struct['categories']; 2564 if ( is_array($catnames) ) { 2565 foreach ($catnames as $cat) { 2566 $post_category[] = get_cat_ID($cat); 2567 } 2561 2568 } 2562 2569 } 2563 2570 2564 $post_excerpt = $content_struct['mt_excerpt'];2565 $post_more = $content_struct['mt_text_more'];2571 $post_excerpt = isset( $content_struct['mt_excerpt'] ) ? $content_struct['mt_excerpt'] : null; 2572 $post_more = isset( $content_struct['mt_text_more'] ) ? $content_struct['mt_text_more'] : null; 2566 2573 2567 2574 $post_status = $publish ? 'publish' : 'draft'; … … 2584 2591 } 2585 2592 2586 $tags_input = $content_struct['mt_keywords'];2593 $tags_input = isset( $content_struct['mt_keywords'] ) ? $content_struct['mt_keywords'] : null; 2587 2594 2588 2595 if ( ('publish' == $post_status) ) { … … 2596 2603 $post_content = $post_content . "<!--more-->" . $post_more; 2597 2604 2598 $to_ping = $content_struct['mt_tb_ping_urls']; 2599 if ( is_array($to_ping) ) 2600 $to_ping = implode(' ', $to_ping); 2605 $to_ping = null; 2606 if ( isset( $content_struct['mt_tb_ping_urls'] ) ) { 2607 $to_ping = $content_struct['mt_tb_ping_urls']; 2608 if ( is_array($to_ping) ) 2609 $to_ping = implode(' ', $to_ping); 2610 } 2601 2611 2602 2612 // Do some timestamp voodoo … … 2636 2646 2637 2647 // Handle enclosures 2638 $this->add_enclosure_if_new($post_ID, $content_struct['enclosure']); 2648 $thisEnclosure = isset($content_struct['enclosure']) ? $content_struct['enclosure'] : null; 2649 $this->add_enclosure_if_new($post_ID, $thisEnclosure); 2639 2650 2640 2651 $this->attach_uploads( $ID, $post_content );
Note: See TracChangeset
for help on using the changeset viewer.