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
This commit is contained in:
rboren 2005-01-20 05:18:55 +00:00
parent 255364a85c
commit bf06e2f857
1 changed files with 1 additions and 4 deletions

View File

@ -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);
}