Minor cleanups.

git-svn-id: https://develop.svn.wordpress.org/trunk@2923 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2005-09-27 03:42:17 +00:00
parent 21cafc609c
commit 81f443ddab
2 changed files with 3 additions and 228 deletions

View File

@@ -70,7 +70,9 @@ function write_post() {
// Move child posts to a new parent
function relocate_children($old_ID, $new_ID) {
global $wpdb;
$wpdb->query("UPDATE $wpdb->posts SET post_parent = $new_ID WHERE post_parent = $old_ID");
$old_ID = (int) $old_ID;
$new_ID = (int) $new_ID;
return $wpdb->query("UPDATE $wpdb->posts SET post_parent = $new_ID WHERE post_parent = $old_ID");
}
// Update an existing post with values provided in $_POST.