From 846e3e9fbdce80c3ff84e7ae94d5d7d698e4978a Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 29 Jan 2021 17:20:25 -0500 Subject: [PATCH] bin/rebuildPad.js: Don't overwrite DB settings There's no need, and setting `json` to true breaks databases that do their own serialization of ECMAScript objects. --- bin/rebuildPad.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bin/rebuildPad.js b/bin/rebuildPad.js index f541a4ce4..870bbcc4a 100644 --- a/bin/rebuildPad.js +++ b/bin/rebuildPad.js @@ -28,11 +28,6 @@ const newPadId = process.argv[4] || `${padId}-rebuilt`; const PadManager = require('ep_etherpad-lite/node/db/PadManager'); const Pad = require('ep_etherpad-lite/node/db/Pad').Pad; - // Get references to the original pad and to a newly created pad - // HACK: This is a standalone script, so we want to write everything - // out to the database immediately. The only problem with this is - // that a driver (like the mysql driver) can hardcode these values. - db.db.db.settings = {cache: 0, writeInterval: 0, json: true}; // Validate the newPadId if specified and that a pad with that ID does // not already exist to avoid overwriting it. if (!PadManager.isValidPadId(newPadId)) {