mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Use update and insert. Props DD32. fixes #6836
git-svn-id: https://develop.svn.wordpress.org/trunk@12652 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1776,7 +1776,7 @@ function page_rows($pages, $pagenum = 1, $per_page = 20) {
|
||||
// catch and repair bad pages
|
||||
if ( $page->post_parent == $page->ID ) {
|
||||
$page->post_parent = 0;
|
||||
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = '0' WHERE ID = %d", $page->ID) );
|
||||
$wpdb->update($wpdb->posts, array('post_parent' => 0), array('ID' => $page->ID));
|
||||
clean_page_cache( $page->ID );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user