diff --git a/public/.eslintrc b/public/.eslintrc
index 2f938bb71a..d328902f77 100644
--- a/public/.eslintrc
+++ b/public/.eslintrc
@@ -5,7 +5,6 @@
"socket": true,
"ajaxify": true,
"config": true,
- "RELATIVE_PATH": true,
"utils": true,
"overrides": true,
"componentHandler": true,
diff --git a/public/.jshintrc b/public/.jshintrc
index 5201bccc62..0b65b2f3db 100644
--- a/public/.jshintrc
+++ b/public/.jshintrc
@@ -63,7 +63,6 @@
"socket": true,
"ajaxify": true,
"config": true,
- "RELATIVE_PATH": true,
"utils": true,
"overrides": true,
"componentHandler": true,
diff --git a/public/src/admin/dashboard.js b/public/src/admin/dashboard.js
index 5f0fe60a68..b410d0d9bb 100644
--- a/public/src/admin/dashboard.js
+++ b/public/src/admin/dashboard.js
@@ -521,12 +521,14 @@ define('admin/dashboard', ['semver', 'Chart', 'translator', 'benchpress'], funct
function buildTopicsLegend() {
var legend = $('#topics-legend').html('');
var html = '';
- topics.forEach(function (topic, i) {
- var label = topic.count === '0' ? topic.title : ' ' + topic.title + '';
+ topics.forEach(function (t, i) {
+ var label = t.count === '0' ?
+ t.title :
+ ' ' + t.title + '';
html += '
' +
'' +
- ' (' + topic.count + ') ' + label + '' +
+ ' (' + t.count + ') ' + label + '' +
'';
});
legend.translateHtml(html);
diff --git a/public/src/admin/extend/widgets.js b/public/src/admin/extend/widgets.js
index 4f5ff845fd..4991b9e6d2 100644
--- a/public/src/admin/extend/widgets.js
+++ b/public/src/admin/extend/widgets.js
@@ -203,7 +203,7 @@ define('admin/extend/widgets', ['jqueryui'], function () {
return widget;
}
- $.get(RELATIVE_PATH + '/api/admin/extend/widgets', function (data) {
+ $.get(config.relative_path + '/api/admin/extend/widgets', function (data) {
var areas = data.areas;
for (var i = 0; i < areas.length; i += 1) {
diff --git a/public/src/client/topic.js b/public/src/client/topic.js
index af5e903e10..073cb393b1 100644
--- a/public/src/client/topic.js
+++ b/public/src/client/topic.js
@@ -235,7 +235,7 @@ define('forum/topic', [
history.replaceState({
url: newUrl + search,
- }, null, window.location.protocol + '//' + window.location.host + RELATIVE_PATH + '/' + newUrl + search);
+ }, null, window.location.protocol + '//' + window.location.host + config.relative_path + '/' + newUrl + search);
}
currentUrl = newUrl;
}, 500);
diff --git a/src/views/admin/header.tpl b/src/views/admin/header.tpl
index d6eba4b640..a0f5fef1e3 100644
--- a/src/views/admin/header.tpl
+++ b/src/views/admin/header.tpl
@@ -8,10 +8,8 @@