mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 01:16:15 -04:00
fix for caching plugin-definitions
This commit is contained in:
parent
bdb78adb3f
commit
0bb3e65020
5 changed files with 32 additions and 20 deletions
|
@ -12,9 +12,10 @@ exports.update = (cb) => {
|
|||
// of execution on Firefox. This schedules the response in the run-loop,
|
||||
// which appears to fix the issue.
|
||||
const callback = () => setTimeout(cb, 0);
|
||||
$.ajaxSetup({cache: false});
|
||||
|
||||
jQuery.getJSON(`${exports.baseURL}pluginfw/plugin-definitions.json`).done((data) => {
|
||||
jQuery.getJSON(
|
||||
`${exports.baseURL}pluginfw/plugin-definitions.json?v=${clientVars.randomVersionString}`
|
||||
).done((data) => {
|
||||
defs.plugins = data.plugins;
|
||||
defs.parts = data.parts;
|
||||
defs.hooks = pluginUtils.extractHooks(defs.parts, 'client_hooks');
|
||||
|
|
|
@ -5,11 +5,14 @@ const plugins = require('./plugins');
|
|||
const hooks = require('./hooks');
|
||||
const request = require('request');
|
||||
const runCmd = require('../../../node/utils/run_cmd');
|
||||
const settings = require('../../../node/utils/Settings');
|
||||
|
||||
const logger = log4js.getLogger('plugins');
|
||||
|
||||
const onAllTasksFinished = () => {
|
||||
hooks.aCallAll('restartServer', {}, () => {});
|
||||
const onAllTasksFinished = async () => {
|
||||
settings.reloadSettings();
|
||||
await hooks.aCallAll('loadSettings', {settings});
|
||||
await hooks.aCallAll('restartServer');
|
||||
};
|
||||
|
||||
let tasks = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue