Fixed all requires
This commit is contained in:
parent
8736b945c3
commit
2aafcc1027
|
@ -18,7 +18,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var db = require("./db").db;
|
||||
var db = require("./DB").db;
|
||||
var async = require("async");
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
|
||||
var ueberDB = require("ueberDB");
|
||||
var settings = require("./settings");
|
||||
var settings = require("../utils/Settings");
|
||||
|
||||
//set database settings
|
||||
var db = new ueberDB.database(settings.dbType, settings.dbSettings);
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
* The pad object, defined with joose
|
||||
*/
|
||||
|
||||
var Changeset = require("../Changeset");
|
||||
var AttributePoolFactory = require("../AttributePoolFactory");
|
||||
var db = require("../db").db;
|
||||
var Changeset = require("../utils/Changeset");
|
||||
var AttributePoolFactory = require("../utils/AttributePoolFactory");
|
||||
var db = require("./DB").db;
|
||||
var async = require("async");
|
||||
var settings = require('../settings');
|
||||
var authorManager = require("../AuthorManager");
|
||||
var settings = require('../utils/Settings');
|
||||
var authorManager = require("./AuthorManager");
|
||||
|
||||
/**
|
||||
* Copied from the Etherpad source code. It converts Windows line breaks to Unix line breaks and convert Tabs to spaces
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var Changeset = require("./Models/Pad");
|
||||
require("../db/Pad");
|
||||
|
||||
/**
|
||||
* A Array with all known Pads
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var db = require("./db").db;
|
||||
var db = require("./DB").db;
|
||||
var async = require("async");
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,15 +18,15 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var exporthtml = require("./exporters/exporthtml");
|
||||
var padManager = require("./PadManager");
|
||||
var exporthtml = require("../utils/ExportHtml");
|
||||
var padManager = require("../db/PadManager");
|
||||
var async = require("async");
|
||||
var fs = require("fs");
|
||||
var settings = require('./settings');
|
||||
var settings = require('../utils/Settings');
|
||||
|
||||
//load abiword only if its enabled
|
||||
if(settings.abiword != null)
|
||||
var abiword = require("./Abiword");
|
||||
var abiword = require("../utils/Abiword");
|
||||
|
||||
/**
|
||||
* do a requested export
|
||||
|
|
|
@ -18,16 +18,16 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var padManager = require("./PadManager");
|
||||
var padManager = require("../db/PadManager");
|
||||
var padMessageHandler = require("./PadMessageHandler");
|
||||
var async = require("async");
|
||||
var fs = require("fs");
|
||||
var settings = require('./settings');
|
||||
var settings = require('../utils/Settings');
|
||||
var formidable = require('formidable');
|
||||
|
||||
//load abiword only if its enabled
|
||||
if(settings.abiword != null)
|
||||
var abiword = require("./Abiword");
|
||||
var abiword = require("../utils/Abiword");
|
||||
|
||||
/**
|
||||
* do a requested import
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
*/
|
||||
|
||||
var async = require("async");
|
||||
var padManager = require("./PadManager");
|
||||
var Changeset = require("./Changeset");
|
||||
var AttributePoolFactory = require("./AttributePoolFactory");
|
||||
var authorManager = require("./AuthorManager");
|
||||
var readOnlyManager = require("./ReadOnlyManager");
|
||||
var settings = require('./settings');
|
||||
var padManager = require("../db/PadManager");
|
||||
var Changeset = require("../utils/Changeset");
|
||||
var AttributePoolFactory = require("../utils/AttributePoolFactory");
|
||||
var authorManager = require("../db/AuthorManager");
|
||||
var readOnlyManager = require("../db/ReadOnlyManager");
|
||||
var settings = require('../utils/Settings');
|
||||
|
||||
/**
|
||||
* A associative array that translates a session to a pad
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
*/
|
||||
|
||||
var async = require("async");
|
||||
var padManager = require("./PadManager");
|
||||
var Changeset = require("./Changeset");
|
||||
var AttributePoolFactory = require("./AttributePoolFactory");
|
||||
var authorManager = require("./AuthorManager");
|
||||
var padManager = require("../db/PadManager");
|
||||
var Changeset = require("../utils/Changeset");
|
||||
var AttributePoolFactory = require("../utils/AttributePoolFactory");
|
||||
var authorManager = require("../db/AuthorManager");
|
||||
|
||||
/**
|
||||
* Saves the Socket class we need to send and recieve data from the client
|
||||
|
|
|
@ -24,13 +24,13 @@ require('joose');
|
|||
|
||||
var socketio = require('socket.io');
|
||||
var fs = require('fs');
|
||||
var settings = require('./settings');
|
||||
var socketIORouter = require("./SocketIORouter");
|
||||
var db = require('./db');
|
||||
var settings = require('./utils/Settings');
|
||||
var socketIORouter = require("./handler/SocketIORouter");
|
||||
var db = require('./db/DB');
|
||||
var async = require('async');
|
||||
var express = require('express');
|
||||
var path = require('path');
|
||||
var minify = require('./minify');
|
||||
var minify = require('./utils/Minify');
|
||||
var formidable = require('formidable');
|
||||
var exportHandler;
|
||||
var importHandler;
|
||||
|
@ -69,10 +69,10 @@ async.waterfall([
|
|||
var app = express.createServer();
|
||||
|
||||
//load modules that needs a initalized db
|
||||
readOnlyManager = require("./ReadOnlyManager");
|
||||
exporthtml = require("./exporters/exporthtml");
|
||||
exportHandler = require('./ExportHandler');
|
||||
importHandler = require('./ImportHandler');
|
||||
readOnlyManager = require("./db/ReadOnlyManager");
|
||||
exporthtml = require("./utils/ExportHtml");
|
||||
exportHandler = require('./handler/ExportHandler');
|
||||
importHandler = require('./handler/ImportHandler');
|
||||
|
||||
//set logging
|
||||
if(settings.logHTTP)
|
||||
|
@ -271,8 +271,8 @@ async.waterfall([
|
|||
if(settings.minify)
|
||||
io.enable('browser client minification');
|
||||
|
||||
var padMessageHandler = require("./PadMessageHandler");
|
||||
var timesliderMessageHandler = require("./TimesliderMessageHandler");
|
||||
var padMessageHandler = require("./handler/PadMessageHandler");
|
||||
var timesliderMessageHandler = require("./handler/TimesliderMessageHandler");
|
||||
|
||||
//Initalize the Socket.IO Router
|
||||
socketIORouter.setSocketIO(io);
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
var async = require("async");
|
||||
var Changeset = require("../Changeset");
|
||||
var padManager = require("../PadManager");
|
||||
var Changeset = require("./Changeset");
|
||||
var padManager = require("../db/PadManager");
|
||||
|
||||
|
||||
function getPadPlainText(pad, revNum) {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var settings = require('./settings');
|
||||
var settings = require('./Settings');
|
||||
var async = require('async');
|
||||
var fs = require('fs');
|
||||
var cleanCSS = require('clean-css');
|
||||
|
@ -28,7 +28,7 @@ var pro = require("uglify-js").uglify;
|
|||
var path = require('path');
|
||||
var Buffer = require('buffer').Buffer;
|
||||
var gzip = require('gzip');
|
||||
var server = require('./server');
|
||||
var server = require('../server');
|
||||
|
||||
var padJS = ["jquery.min.js", "pad_utils.js", "plugins.js", "undo-xpopup.js", "json2.js", "pad_cookie.js", "pad_editor.js", "pad_editbar.js", "pad_docbar.js", "pad_modals.js", "ace.js", "collab_client.js", "pad_userlist.js", "pad_impexp.js", "pad_savedrevs.js", "pad_connectionstatus.js", "pad2.js", "jquery-ui.js", "chat.js"];
|
||||
|
||||
|
@ -240,12 +240,12 @@ exports.minifyJS = function(req, res, jsFilename)
|
|||
var pathStr;
|
||||
if(gzipSupport)
|
||||
{
|
||||
pathStr = path.normalize(__dirname + "/../var/minified_" + jsFilename + ".gz");
|
||||
pathStr = path.normalize(__dirname + "/../../var/minified_" + jsFilename + ".gz");
|
||||
res.header('Content-Encoding', 'gzip');
|
||||
}
|
||||
else
|
||||
{
|
||||
pathStr = path.normalize(__dirname + "/../var/minified_" + jsFilename );
|
||||
pathStr = path.normalize(__dirname + "/../../var/minified_" + jsFilename );
|
||||
}
|
||||
|
||||
res.sendfile(pathStr, { maxAge: server.maxAge });
|
||||
|
|
Loading…
Reference in New Issue