s/logio/logIO/. Remove logio calls from the one function in functions-post.php that uses it. functions-post.php is not used by xmlrpc.php exclusively.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
16cffbe786
commit
83e6c81f41
|
@ -167,13 +167,9 @@ function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array(
|
||||||
$oldies = printr($old_categories,1);
|
$oldies = printr($old_categories,1);
|
||||||
$newbies = printr($post_categories,1);
|
$newbies = printr($post_categories,1);
|
||||||
|
|
||||||
logio("O","Old: $oldies\nNew: $newbies\n");
|
|
||||||
|
|
||||||
// Delete any?
|
// Delete any?
|
||||||
$delete_cats = array_diff($old_categories,$post_categories);
|
$delete_cats = array_diff($old_categories,$post_categories);
|
||||||
|
|
||||||
logio("O","Delete: " . printr($delete_cats,1));
|
|
||||||
|
|
||||||
if ($delete_cats) {
|
if ($delete_cats) {
|
||||||
foreach ($delete_cats as $del) {
|
foreach ($delete_cats as $del) {
|
||||||
$wpdb->query("
|
$wpdb->query("
|
||||||
|
@ -181,23 +177,17 @@ function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array(
|
||||||
WHERE category_id = $del
|
WHERE category_id = $del
|
||||||
AND post_id = $post_ID
|
AND post_id = $post_ID
|
||||||
");
|
");
|
||||||
|
|
||||||
logio("O","deleting post/cat: $post_ID, $del");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add any?
|
// Add any?
|
||||||
$add_cats = array_diff($post_categories, $old_categories);
|
$add_cats = array_diff($post_categories, $old_categories);
|
||||||
|
|
||||||
logio("O","Add: " . printr($add_cats,1));
|
|
||||||
|
|
||||||
if ($add_cats) {
|
if ($add_cats) {
|
||||||
foreach ($add_cats as $new_cat) {
|
foreach ($add_cats as $new_cat) {
|
||||||
$wpdb->query("
|
$wpdb->query("
|
||||||
INSERT INTO $wpdb->post2cat (post_id, category_id)
|
INSERT INTO $wpdb->post2cat (post_id, category_id)
|
||||||
VALUES ($post_ID, $new_cat)");
|
VALUES ($post_ID, $new_cat)");
|
||||||
|
|
||||||
logio("O","adding post/cat: $post_ID, $new_cat");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // wp_set_post_cats()
|
} // wp_set_post_cats()
|
||||||
|
|
|
@ -519,7 +519,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
$catnames = $content_struct['categories'];
|
$catnames = $content_struct['categories'];
|
||||||
logio('O', 'Post cats: ' . printr($catnames,true));
|
logIO('O', 'Post cats: ' . printr($catnames,true));
|
||||||
$post_category = array();
|
$post_category = array();
|
||||||
|
|
||||||
if ($catnames) {
|
if ($catnames) {
|
||||||
|
|
Loading…
Reference in New Issue