Let's switch back to using post numbers rather than last for links to

the last post. We'll keep support for the old format, but start linking
directly to the last post.
This commit is contained in:
Robin Ward 2014-06-06 10:13:32 -04:00
parent cc1bbf3a7b
commit 6048c9e100

View File

@ -73,11 +73,7 @@ Discourse.Topic = Discourse.Model.extend({
urlForPostNumber: function(postNumber) { urlForPostNumber: function(postNumber) {
var url = this.get('url'); var url = this.get('url');
if (postNumber && (postNumber > 0)) { if (postNumber && (postNumber > 0)) {
if (postNumber >= this.get('highest_post_number')) { url += "/" + postNumber;
url += "/last";
} else {
url += "/" + postNumber;
}
} }
return url; return url;
}, },