Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 12942)
+++ wp-includes/link-template.php	(working copy)
@@ -195,7 +195,7 @@
 		$post_link = home_url($post_link);
 	}
 
-	return apply_filters('post_type_link', $post_link, $id);
+	return apply_filters('post_type_link', $post_link, $id, $leavename);
 }
 
 /**

