/archives/%post_id% permalinks break for post ids over 1000. http://mosquito.wordpress.org/view.php?id=847

git-svn-id: http://svn.automattic.com/wordpress/trunk@2296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2005-02-13 18:26:50 +00:00
parent 8ee644d067
commit 7c6579f01f
1 changed files with 7 additions and 1 deletions

View File

@ -854,8 +854,14 @@ class WP_Rewrite {
}
}
// Do not allow the date tags and %post_id% to overlap in the permalink
// structure. If they do, move the date tags to $front/date/.
$front = $this->front;
if ( false !== strpos($this->permalink_structure, $this->front . '%post_id%') )
$front = $front . 'date/';
if (empty($this->date_structure)) {
$this->date_structure = $this->front . '%year%/%monthnum%/%day%';
$this->date_structure = $front . '%year%/%monthnum%/%day%';
}
return $this->date_structure;