Oops. Patch didn't apply cleanly. fixes #1750
git-svn-id: http://svn.automattic.com/wordpress/trunk@2947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e3af2b4163
commit
f95b357e8d
|
@ -107,10 +107,10 @@ function wp_insert_category($catarr) {
|
|||
$category_parent = 0;
|
||||
|
||||
if (!$update) {
|
||||
$query = "INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')";
|
||||
$wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')");
|
||||
$cat_ID = $wpdb->insert_id;
|
||||
} else {
|
||||
$query = "UPDATE $wpdb->categories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = '$category_parent' WHERE cat_ID = '$cat_ID'";
|
||||
$wpdb->query ("UPDATE $wpdb->categories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = '$category_parent' WHERE cat_ID = '$cat_ID'");
|
||||
}
|
||||
|
||||
if ( $category_nicename == '' ) {
|
||||
|
@ -118,8 +118,6 @@ function wp_insert_category($catarr) {
|
|||
$wpdb->query( "UPDATE $wpdb->categories SET category_nicename = '$category_nicename' WHERE cat_ID = '$cat_ID'" );
|
||||
}
|
||||
|
||||
$result = $wpdb->query($query);
|
||||
|
||||
if ($update) {
|
||||
do_action('edit_category', $cat_ID);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue