From bf06e2f857f9354a7080b54a57c8e24d0f9d0d0e Mon Sep 17 00:00:00 2001 From: rboren Date: Thu, 20 Jan 2005 05:18:55 +0000 Subject: [PATCH] If post title is not provided, we still need to have a sanitized name for use in permalinks. Use the post id. Bug 717. git-svn-id: http://svn.automattic.com/wordpress/trunk@2109 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/post.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wp-admin/post.php b/wp-admin/post.php index a45909f157..85162350b7 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -85,7 +85,6 @@ case 'post': $post_ID = $id_result->Auto_increment; if ( empty($post_name) ) { - if ( !empty($post_title) ) $post_name = sanitize_title($post_title, $post_ID); } else { $post_name = sanitize_title($post_name, $post_ID); @@ -268,9 +267,7 @@ case 'editpost': } if (empty($post_name)) { - if (! empty($post_title)) { - $post_name = sanitize_title($post_title, $post_ID); - } + $post_name = sanitize_title($post_title, $post_ID); } else { $post_name = sanitize_title($post_name, $post_ID); }