Store base URI in Discourse.BaseUri and use it in all places where rootURL was previously used

This commit is contained in:
Wojciech Kocjan
2013-04-04 00:26:47 +02:00
parent bb18b6cb9b
commit a875b1c44a
5 changed files with 9 additions and 25 deletions

View File

@ -22,10 +22,8 @@ Discourse = Ember.Application.createWithMixins({
// The highest seen post number by topic
highestSeenByTopic: {},
rootURL: '/',
getURL: function(url) {
var u = this.get('rootURL');
var u = (Discourse.BaseUri === undefined ? "/" : Discourse.BaseUri);
if (u[u.length-1] === '/') {
u = u.substring(0, u.length-1);
}