mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 17:06:16 -04:00
Merge branch 'develop' of github.com:ether/etherpad-lite into develop
This commit is contained in:
commit
178309e10d
27 changed files with 353 additions and 19 deletions
|
@ -48,7 +48,7 @@ exports.getPadRaw = function(padId, callback){
|
|||
|
||||
// Get the author info
|
||||
db.get("globalAuthor:"+authorId, function(e, authorEntry){
|
||||
authorEntry.padIDs = padId;
|
||||
if(authorEntry && authorEntry.padIDs) authorEntry.padIDs = padId;
|
||||
if(!e) data["globalAuthor:"+authorId] = authorEntry;
|
||||
});
|
||||
|
||||
|
|
|
@ -21,9 +21,22 @@ var db = require("../db/DB").db;
|
|||
exports.setPadRaw = function(padId, records, callback){
|
||||
records = JSON.parse(records);
|
||||
|
||||
// !! HACK !!
|
||||
// If you have a really large pad it will cause a Maximum Range Stack crash
|
||||
// This is a temporary patch for that so things are kept stable.
|
||||
var recordCount = Object.keys(records).length;
|
||||
if(recordCount >= 50000){
|
||||
console.warn("Etherpad file is too large to import.. We need to fix this. See https://github.com/ether/etherpad-lite/issues/2524");
|
||||
return callback("tooLarge", false);
|
||||
}
|
||||
|
||||
async.eachSeries(Object.keys(records), function(key, cb){
|
||||
var value = records[key]
|
||||
|
||||
if(!value){
|
||||
cb(); // null values are bad.
|
||||
}
|
||||
|
||||
// Author data
|
||||
if(value.padIDs){
|
||||
// rewrite author pad ids
|
||||
|
@ -34,7 +47,9 @@ exports.setPadRaw = function(padId, records, callback){
|
|||
db.get(key, function(err, author){
|
||||
if(author){
|
||||
// Yes, add the padID to the author..
|
||||
author.padIDs.push(padId);
|
||||
if( Object.prototype.toString.call(author) === '[object Array]'){
|
||||
author.padIDs.push(padId);
|
||||
}
|
||||
value = author;
|
||||
}else{
|
||||
// No, create a new array with the author info in
|
||||
|
|
|
@ -144,6 +144,11 @@ exports.loglevel = "INFO";
|
|||
*/
|
||||
exports.disableIPlogging = false;
|
||||
|
||||
/**
|
||||
* Disable Load Testing
|
||||
*/
|
||||
exports.loadTest = false;
|
||||
|
||||
/*
|
||||
* log4js appender configuration
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue