more cleanup; commenting out custom plugin routes until its fixed properly

v1.18.x
psychobunny 11 years ago
parent c0cd6148f4
commit 8f7a7fec7d

@ -108,7 +108,7 @@ Controllers.search = function(req, res, next) {
Controllers.reset = function(req, res, next) { Controllers.reset = function(req, res, next) {
var data = { var data = {
reset_code: req.params.code ? req.params.code : null reset_code: req.params.code ? req.params.code : null
} };
if (res.locals.isAPI) { if (res.locals.isAPI) {
res.json(data); res.json(data);

@ -12,12 +12,12 @@ var nconf = require('nconf'),
topics = require('./../topics'), topics = require('./../topics'),
pkg = require('./../../package'), pkg = require('./../../package'),
categories = require('./../categories'), categories = require('./../categories'),
meta = require('../meta'), meta = require('./../meta'),
plugins = require('../plugins'), plugins = require('./../plugins'),
widgets = require('../widgets'), widgets = require('./../widgets'),
image = require('./../image'), image = require('./../image'),
file = require('./../file'), file = require('./../file'),
Languages = require('../languages'), Languages = require('./../languages'),
events = require('./../events'), events = require('./../events'),
utils = require('./../../public/src/utils'), utils = require('./../../public/src/utils'),
templates = require('./../../public/src/templates'); templates = require('./../../public/src/templates');

@ -7,10 +7,10 @@
bcrypt = require('bcryptjs'), bcrypt = require('bcryptjs'),
winston = require('winston'), winston = require('winston'),
meta = require('../meta'), meta = require('./../meta'),
user = require('../user'), user = require('./../user'),
plugins = require('../plugins'), plugins = require('./../plugins'),
utils = require('../../public/src/utils'), utils = require('./../../public/src/utils'),
templates = require('./../../public/src/templates'), templates = require('./../../public/src/templates'),
login_strategies = []; login_strategies = [];

@ -1,14 +1,14 @@
"use strict"; "use strict";
var posts = require('../posts'), var posts = require('./../posts'),
topics = require('../topics'), topics = require('./../topics'),
categories = require('../categories'), categories = require('./../categories'),
rss = require('rss'), rss = require('rss'),
nconf = require('nconf'), nconf = require('nconf'),
ThreadTools = require('../threadTools'), ThreadTools = require('./../threadTools'),
CategoryTools = require('../categoryTools'); CategoryTools = require('./../categoryTools');
function hasTopicPrivileges(req, res, next) { function hasTopicPrivileges(req, res, next) {
var tid = req.params.topic_id; var tid = req.params.topic_id;

@ -4,9 +4,9 @@ var path = require('path'),
nconf = require('nconf'), nconf = require('nconf'),
less = require('less'), less = require('less'),
meta = require('../meta'), meta = require('./../meta'),
db = require('../database'), db = require('./../database'),
plugins = require('../plugins'), plugins = require('./../plugins'),
minificationEnabled = false; minificationEnabled = false;

@ -1,10 +1,10 @@
"use strict"; "use strict";
var nconf = require('nconf'), var _ = require('underscore'),
nconf = require('nconf'),
path = require('path'), path = require('path'),
fs = require('fs'), fs = require('fs'),
validator = require('validator'), validator = require('validator'),
_ = require('underscore'),
async = require('async'), async = require('async'),
plugins = require('../plugins'); plugins = require('../plugins');
@ -35,12 +35,12 @@ function setupPluginRoutes(app) {
(function(route) { (function(route) {
app[routes[route].method || 'get'](routes[route].route, function(req, res) { app[routes[route].method || 'get'](routes[route].route, function(req, res) {
routes[route].options(req, res, function(options) { routes[route].options(req, res, function(options) {
app.build_header({ /*app.build_header({
req: options.req || req, req: options.req || req,
res: options.res || res res: options.res || res
}, function (err, header) { }, function (err, header) {
//res.send(header + options.content + templates.footer); //res.send(header + options.content + templates.footer);
}); });*/
}); });
}); });
}(route)); }(route));
@ -93,9 +93,9 @@ function setupPluginAdminRoutes(app) {
(function(route) { (function(route) {
app[routes[route].method || 'get']('/admin' + routes[route].route, function(req, res) { app[routes[route].method || 'get']('/admin' + routes[route].route, function(req, res) {
routes[route].options(req, res, function(options) { routes[route].options(req, res, function(options) {
Admin.buildHeader(req, res, function (err, header) { //Admin.buildHeader(req, res, function (err, header) {
//res.send(header + options.content + templates['admin/footer']); //res.send(header + options.content + templates['admin/footer']);
}); //});
}); });
}); });
}(route)); }(route));

@ -84,12 +84,12 @@ if(nconf.get('ssl')) {
module.exports.init = function () { module.exports.init = function () {
plugins.fireHook('action:app.load', app); plugins.fireHook('action:app.load', app);
server.on("error", function(e){ server.on("error", function(err){
if (e.code === 'EADDRINUSE') { if (err.code === 'EADDRINUSE') {
winston.error('NodeBB address in use, exiting...'); winston.error('NodeBB address in use, exiting...');
process.exit(1); process.exit(1);
} else { } else {
throw e; throw err;
} }
}); });

Loading…
Cancel
Save