Fix links to topics with empty slug because they use non-ascii titles

This commit is contained in:
Neil Lalonde 2013-04-19 16:47:14 -04:00
parent 0cd7c592ec
commit 2c516400de
2 changed files with 3 additions and 3 deletions

View File

@ -75,6 +75,8 @@ Discourse.Utilities = {
url = Discourse.getURL("/t/");
if (slug) {
url += slug + "/";
} else {
url += 'topic/';
}
url += topicId;
if (postNumber > 1) {

View File

@ -14,10 +14,8 @@ Discourse.Notification = Discourse.Model.extend({
}).property('read'),
url: (function() {
var slug;
if (this.blank('data.topic_title')) return "";
slug = this.get('slug');
return Discourse.getURL("/t/") + slug + "/" + (this.get('topic_id')) + "/" + (this.get('post_number'));
return Discourse.Utilities.postUrl(this.get('slug'), this.get('topic_id'), this.get('post_number'));
}).property(),
rendered: (function() {