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) {
var data = {
reset_code: req.params.code ? req.params.code : null
}
};
if (res.locals.isAPI) {
res.json(data);

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

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

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

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

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

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

Loading…
Cancel
Save