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: https://develop.svn.wordpress.org/trunk@2109 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-01-20 05:18:55 +00:00
parent 0eb885279c
commit 8aee31bc63
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);
}