v1.18.x
barisusakli 9 years ago
parent 247a5aab41
commit 6963632846

@ -1,10 +1,11 @@
"use strict";
var navigation = {};
var nconf = require('nconf');
var admin = require('./admin');
var translator = require('../../public/src/modules/translator');
var navigation = {};
navigation.get = function(callback) {
if (admin.cache) {
return callback(null, admin.cache);
@ -18,6 +19,10 @@ navigation.get = function(callback) {
data = data.filter(function(item) {
return item && item.enabled;
}).map(function(item) {
if (!item.route.startsWith('http')) {
item.route = nconf.get('relative_path') + item.route;
}
for (var i in item) {
if (item.hasOwnProperty(i)) {
item[i] = translator.unescape(item[i]);

Loading…
Cancel
Save