summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEgil Moeller <egil.moller@freecode.no>2010-03-25 20:07:25 +0100
committerEgil Moeller <egil.moller@freecode.no>2010-03-25 20:07:25 +0100
commit4a7368c13998a225f6c0b32484aa9cbf8d5334ce (patch)
treed3e40fa9cec39cbae9c8735bb5c03c588c5cc713
parent8536c02d4f3029c70d052d4b5cabfd23dd06e200 (diff)
downloadetherpad-4a7368c13998a225f6c0b32484aa9cbf8d5334ce.tar.gz
etherpad-4a7368c13998a225f6c0b32484aa9cbf8d5334ce.tar.bz2
etherpad-4a7368c13998a225f6c0b32484aa9cbf8d5334ce.zip
Added padModelWriteToDB hook
-rw-r--r--etherpad/src/etherpad/pad/model.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/etherpad/src/etherpad/pad/model.js b/etherpad/src/etherpad/pad/model.js
index 9424f10..3f44dfa 100644
--- a/etherpad/src/etherpad/pad/model.js
+++ b/etherpad/src/etherpad/pad/model.js
@@ -30,6 +30,8 @@ import("etherpad.pad.pad_migrations");
import("etherpad.pad.pad_security");
import("etherpad.collab.collab_server");
import("cache_utils.syncedWithCache");
+import("etherpad.admin.plugins");
+
jimport("net.appjet.common.util.LimitedSizeMapping");
jimport("java.lang.System.out.println");
@@ -258,6 +260,8 @@ function accessPadGlobal(padId, padFunc, rwMode) {
delete meta2.status;
sqlbase.putJSON("PAD_META", padId, meta2);
+ plugins.callHook("padModelWriteToDB", {pad:pad, padId:padId});
+
_getPadStringArray(padId, "revs").writeToDB();
_getPadStringArray(padId, "revs10").writeToDB();
_getPadStringArray(padId, "revs100").writeToDB();