From fbe544340579043de679122a01cbcea5fb9f8649 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Sun, 7 Dec 2003 09:26:05 +0000 Subject: [PATCH] Interface tweaks. git-svn-id: http://svn.automattic.com/wordpress/trunk@576 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/wp-admin.css | 1 + wp-admin/wp-post.php | 39 +++++++++++++++++++++------------------ 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index e168948bcd..744b8a9b57 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 0853ab19fb..0650868e4a 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;