mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
ImportHandler: Drop unnecessary underscores in variable names
Also delete an unnecessary comment.
This commit is contained in:
parent
2512593d4b
commit
c8f2409de0
1 changed files with 4 additions and 7 deletions
|
@ -139,18 +139,15 @@ const doImport = async (req, res, padId) => {
|
||||||
|
|
||||||
let directDatabaseAccess = false;
|
let directDatabaseAccess = false;
|
||||||
if (fileIsEtherpad) {
|
if (fileIsEtherpad) {
|
||||||
// we do this here so we can see if the pad has quite a few edits
|
const pad = await padManager.getPad(padId);
|
||||||
const _pad = await padManager.getPad(padId);
|
const headCount = pad.head;
|
||||||
const headCount = _pad.head;
|
|
||||||
|
|
||||||
if (headCount >= 10) {
|
if (headCount >= 10) {
|
||||||
logger.warn('Aborting direct database import attempt of a pad that already has content');
|
logger.warn('Aborting direct database import attempt of a pad that already has content');
|
||||||
throw new ImportError('padHasData');
|
throw new ImportError('padHasData');
|
||||||
}
|
}
|
||||||
|
const text = await fs.readFile(srcFile, 'utf8');
|
||||||
const _text = await fs.readFile(srcFile, 'utf8');
|
|
||||||
directDatabaseAccess = true;
|
directDatabaseAccess = true;
|
||||||
await importEtherpad.setPadRaw(padId, _text);
|
await importEtherpad.setPadRaw(padId, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert file to html if necessary
|
// convert file to html if necessary
|
||||||
|
|
Loading…
Reference in a new issue