diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index e168948bc..744b8a9b5 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -273,6 +273,7 @@ textarea, input, select { #titlediv, #poststatusdiv, #commentstatusdiv, #pingstatusdiv, #postpassworddiv { float: left; margin-right: 5px; + height: 6em; } #wphead { diff --git a/wp-admin/wp-post.php b/wp-admin/wp-post.php index 0853ab19f..0650868e4 100644 --- a/wp-admin/wp-post.php +++ b/wp-admin/wp-post.php @@ -103,6 +103,8 @@ switch($action) { $post_ID = $wpdb->get_var("SELECT ID FROM $tableposts ORDER BY ID DESC LIMIT 1"); // Insert categories + // Check to make sure there is a category, if not just set it to some default + if (!$post_categories) $post_categories = $wpdb->get_var("SELECT cat_ID FROM $tablecategories LIMIT 1"); foreach ($post_categories as $post_category) { // Double check it's not there already $exists = $wpdb->get_row("SELECT * FROM $tablepost2cat WHERE post_id = $post_ID AND category_id = $post_category"); @@ -121,6 +123,25 @@ switch($action) { sleep($sleep_after_edit); } + if (!empty($HTTP_POST_VARS['mode'])) { + switch($HTTP_POST_VARS['mode']) { + case 'bookmarklet': + $location = 'b2bookmarklet.php?a=b'; + break; + case 'sidebar': + $location = 'b2sidebar.php?a=b'; + break; + default: + $location = 'wp-post.php'; + break; + } + } else { + $location = 'wp-post.php'; + } + + if ('' != $HTTP_POST_VARS['save']) $location = "wp-post.php?action=edit&post=$post_ID"; + header("Location: $location"); + if ($post_status == 'publish') { if((get_settings('use_geo_positions')) && ($post_latf != null) && ($post_lonf != null)) { pingGeoUrl($post_ID); @@ -147,24 +168,6 @@ switch($action) { } } // end if publish - if (!empty($HTTP_POST_VARS['mode'])) { - switch($HTTP_POST_VARS['mode']) { - case 'bookmarklet': - $location = 'b2bookmarklet.php?a=b'; - break; - case 'sidebar': - $location = 'b2sidebar.php?a=b'; - break; - default: - $location = 'wp-post.php'; - break; - } - } else { - $location = 'wp-post.php'; - } - - if ('' != $HTTP_POST_VARS['save']) $location = "wp-post.php?action=edit&post=$post_ID"; - header("Location: $location"); exit(); break;