Baris Usakli 11 years ago
commit d70c688b65

@ -55,7 +55,7 @@
winston.info(''); winston.info('');
if (!nconf.get('help') && !nconf.get('setup') && !nconf.get('upgrade') && fs.existsSync(__dirname + '/config.json')) { if (!nconf.get('help') && !nconf.get('setup') && !nconf.get('install') && !nconf.get('upgrade') && fs.existsSync(__dirname + '/config.json')) {
// Load server-side configs // Load server-side configs
nconf.file({ nconf.file({
file: __dirname + '/config.json' file: __dirname + '/config.json'
@ -127,7 +127,7 @@
} }
}); });
}); });
} else if (nconf.get('setup') || !fs.existsSync(__dirname + '/config.json')) { } else if (nconf.get('setup') || nconf.get('install') || !fs.existsSync(__dirname + '/config.json')) {
// New install, ask setup questions // New install, ask setup questions
if (nconf.get('setup')) { if (nconf.get('setup')) {
winston.info('NodeBB Setup Triggered via Command Line'); winston.info('NodeBB Setup Triggered via Command Line');

@ -88,7 +88,7 @@ var ajaxify = {};
translator.load(tpl_url); translator.load(tpl_url);
jQuery('#footer, #content').fadeOut(100); jQuery('#footer, #content').addClass('ajaxifying');
templates.flush(); templates.flush();
templates.load_template(function () { templates.load_template(function () {
@ -105,17 +105,17 @@ var ajaxify = {};
app.processPage(); app.processPage();
jQuery('#content, #footer').stop(true, true).fadeIn(200, function () { jQuery('#content, #footer').stop(true, true).removeClass('ajaxifying');
if (window.location.hash) {
hash = window.location.hash;
}
if (hash) { if (window.location.hash) {
require(['forum/topic'], function(topic) { hash = window.location.hash;
topic.scrollToPost(hash.substr(1)); }
});
} if (hash) {
}); require(['forum/topic'], function(topic) {
topic.scrollToPost(hash.substr(1));
});
}
utils.refreshTitle(url); utils.refreshTitle(url);

@ -248,9 +248,12 @@
if (self.blocks && block !== undefined) self.blocks[block] = data[0]; if (self.blocks && block !== undefined) self.blocks[block] = data[0];
var begin = new RegExp("(\r\n)*<!-- BEGIN " + block + " -->(\r\n)*", "g"),
end = new RegExp("(\r\n)*<!-- END " + block + " -->(\r\n)*", "g"),
data = data[0] data = data[0]
.replace("<!--[\\s]*BEGIN " + block + "[\\s]*-->", "") .replace(begin, "")
.replace("<!--[\\s]*END " + block + "[\\s]*-->", ""); .replace(end, "");
return data; return data;
} }

Loading…
Cancel
Save