mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 14:47:12 -04:00
handler/ExportHandler: use jshint
This commit is contained in:
parent
c26c45309a
commit
acbb75c147
1 changed files with 18 additions and 16 deletions
|
@ -28,8 +28,10 @@ var settings = require('../utils/Settings');
|
||||||
var os = require('os');
|
var os = require('os');
|
||||||
|
|
||||||
//load abiword only if its enabled
|
//load abiword only if its enabled
|
||||||
if(settings.abiword != null)
|
if(settings.abiword)
|
||||||
|
{
|
||||||
var abiword = require("../utils/Abiword");
|
var abiword = require("../utils/Abiword");
|
||||||
|
}
|
||||||
|
|
||||||
var tempDirectory = "/tmp";
|
var tempDirectory = "/tmp";
|
||||||
|
|
||||||
|
@ -47,6 +49,10 @@ exports.doExport = function(req, res, padId, type)
|
||||||
//tell the browser that this is a downloadable file
|
//tell the browser that this is a downloadable file
|
||||||
res.attachment(padId + "." + type);
|
res.attachment(padId + "." + type);
|
||||||
|
|
||||||
|
var randNum;
|
||||||
|
var srcFile;
|
||||||
|
var destFile;
|
||||||
|
|
||||||
//if this is a plain text export, we can do this directly
|
//if this is a plain text export, we can do this directly
|
||||||
if(type == "txt")
|
if(type == "txt")
|
||||||
{
|
{
|
||||||
|
@ -59,8 +65,6 @@ exports.doExport = function(req, res, padId, type)
|
||||||
}
|
}
|
||||||
else if(type == 'dokuwiki')
|
else if(type == 'dokuwiki')
|
||||||
{
|
{
|
||||||
var randNum;
|
|
||||||
var srcFile, destFile;
|
|
||||||
|
|
||||||
async.series([
|
async.series([
|
||||||
//render the dokuwiki document
|
//render the dokuwiki document
|
||||||
|
@ -71,7 +75,7 @@ exports.doExport = function(req, res, padId, type)
|
||||||
res.send(dokuwiki);
|
res.send(dokuwiki);
|
||||||
callback("stop");
|
callback("stop");
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
], function(err)
|
], function(err)
|
||||||
{
|
{
|
||||||
if(err && err != "stop") throw err;
|
if(err && err != "stop") throw err;
|
||||||
|
@ -80,8 +84,6 @@ exports.doExport = function(req, res, padId, type)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var html;
|
var html;
|
||||||
var randNum;
|
|
||||||
var srcFile, destFile;
|
|
||||||
|
|
||||||
async.series([
|
async.series([
|
||||||
//render the html document
|
//render the html document
|
||||||
|
@ -152,6 +154,6 @@ exports.doExport = function(req, res, padId, type)
|
||||||
], function(err)
|
], function(err)
|
||||||
{
|
{
|
||||||
if(err && err != "stop") ERR(err);
|
if(err && err != "stop") ERR(err);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue