mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-30 07:53:57 -04:00
Fix links to topics with empty slug because they use non-ascii titles
This commit is contained in:
parent
0cd7c592ec
commit
2c516400de
2 changed files with 3 additions and 3 deletions
app/assets/javascripts/discourse
|
@ -75,6 +75,8 @@ Discourse.Utilities = {
|
||||||
url = Discourse.getURL("/t/");
|
url = Discourse.getURL("/t/");
|
||||||
if (slug) {
|
if (slug) {
|
||||||
url += slug + "/";
|
url += slug + "/";
|
||||||
|
} else {
|
||||||
|
url += 'topic/';
|
||||||
}
|
}
|
||||||
url += topicId;
|
url += topicId;
|
||||||
if (postNumber > 1) {
|
if (postNumber > 1) {
|
||||||
|
|
|
@ -14,10 +14,8 @@ Discourse.Notification = Discourse.Model.extend({
|
||||||
}).property('read'),
|
}).property('read'),
|
||||||
|
|
||||||
url: (function() {
|
url: (function() {
|
||||||
var slug;
|
|
||||||
if (this.blank('data.topic_title')) return "";
|
if (this.blank('data.topic_title')) return "";
|
||||||
slug = this.get('slug');
|
return Discourse.Utilities.postUrl(this.get('slug'), this.get('topic_id'), this.get('post_number'));
|
||||||
return Discourse.getURL("/t/") + slug + "/" + (this.get('topic_id')) + "/" + (this.get('post_number'));
|
|
||||||
}).property(),
|
}).property(),
|
||||||
|
|
||||||
rendered: (function() {
|
rendered: (function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue