From 358e4817310eceec8df664f3c428ba0afdc430dc Mon Sep 17 00:00:00 2001 From: d-a-n Date: Wed, 3 Oct 2012 13:41:40 +0300 Subject: [PATCH] Changed pad hook names to follow naming conventions. Arguments will now be passed as hash. --- src/node/db/Pad.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/node/db/Pad.js b/src/node/db/Pad.js index cf04f9bc0..d6ea8277d 100644 --- a/src/node/db/Pad.js +++ b/src/node/db/Pad.js @@ -89,9 +89,9 @@ Pad.prototype.appendRevision = function appendRevision(aChangeset, author) { authorManager.addPad(author, this.id); if (this.head == 0) { - hooks.callAll("padCreated", this); + hooks.callAll("padCreate", {'pad':this}); } else { - hooks.callAll("padUpdated", this); + hooks.callAll("padUpdate", {'pad':this}); } }; @@ -375,7 +375,7 @@ Pad.prototype.init = function init(text, callback) { _this.appendRevision(firstChangeset, ''); } - hooks.callAll("padLoaded", _this); + hooks.callAll("padLoad", {'pad':_this}); callback(null); }); }; @@ -475,7 +475,7 @@ Pad.prototype.remove = function remove(callback) { { db.remove("pad:"+padID); padManager.unloadPad(padID); - hooks.callAll("padRemoved", padID ); + hooks.callAll("padRemove", {'pad_id':padID}); callback(); } ], function(err)