Perform empty() check on $doing_rss to avoid warning.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e9cd4f12cc
commit
39bf85133f
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (! $doing_rss) {
|
if (empty($doing_rss)) {
|
||||||
$doing_rss = 1;
|
$doing_rss = 1;
|
||||||
require('wp-blog-header.php');
|
require('wp-blog-header.php');
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,14 +205,16 @@ function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array(
|
||||||
function wp_delete_post($postid = 0) {
|
function wp_delete_post($postid = 0) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
$sql = "DELETE FROM $wpdb->post2cat WHERE post_id = $postid";
|
$result = $wpdb->query("DELETE FROM $wpdb->posts WHERE ID = $postid");
|
||||||
$wpdb->query($sql);
|
|
||||||
|
|
||||||
$sql = "DELETE FROM $wpdb->posts WHERE ID = $postid";
|
if (!$result)
|
||||||
|
return $result;
|
||||||
|
|
||||||
$wpdb->query($sql);
|
$wpdb->query("DELETE FROM $wpdb->comments WHERE comment_post_ID = $postid");
|
||||||
|
|
||||||
$result = $wpdb->rows_affected;
|
$wpdb->query("DELETE FROM $wpdb->post2cat WHERE post_id = $postid");
|
||||||
|
|
||||||
|
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE post_id = $postid");
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue