Built motion from commit 616d3211.|2.6.4
[motion2.git] / server / api / plugin / plugin.events.js
index f1c84d3..b3e0bc5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8a5c=['emit','hasOwnProperty','hook','exports','../../mysqldb','Plugin','setMaxListeners','save','update'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x8a5c,0x112));var _0xc8a5=function(_0x4c559f,_0x48fb90){_0x4c559f=_0x4c559f-0x0;var _0x21c1e9=_0x8a5c[_0x4c559f];return _0x21c1e9;};'use strict';var EventEmitter=require('events');var Plugin=require(_0xc8a5('0x0'))['db'][_0xc8a5('0x1')];var PluginEvents=new EventEmitter();PluginEvents[_0xc8a5('0x2')](0x0);var events={'afterCreate':_0xc8a5('0x3'),'afterUpdate':_0xc8a5('0x4'),'afterDestroy':'remove'};function emitEvent(_0xe06918){return function(_0x2f628e,_0x5e4dda,_0x2931ea){PluginEvents['emit'](_0xe06918+':'+_0x2f628e['id'],_0x2f628e);PluginEvents[_0xc8a5('0x5')](_0xe06918,_0x2f628e);_0x2931ea(null);};}for(var e in events){if(events[_0xc8a5('0x6')](e)){var event=events[e];Plugin[_0xc8a5('0x7')](e,emitEvent(event));}}module[_0xc8a5('0x8')]=PluginEvents;
\ No newline at end of file
+var _0x99fb=['hasOwnProperty','exports','events','Plugin','setMaxListeners','save','update','remove','emit'];(function(_0x2235bf,_0x3a06a7){var _0x4c3a64=function(_0x3b3bb6){while(--_0x3b3bb6){_0x2235bf['push'](_0x2235bf['shift']());}};_0x4c3a64(++_0x3a06a7);}(_0x99fb,0x92));var _0xb99f=function(_0x1e65a5,_0x46212f){_0x1e65a5=_0x1e65a5-0x0;var _0x20620b=_0x99fb[_0x1e65a5];return _0x20620b;};'use strict';var EventEmitter=require(_0xb99f('0x0'));var Plugin=require('../../mysqldb')['db'][_0xb99f('0x1')];var PluginEvents=new EventEmitter();PluginEvents[_0xb99f('0x2')](0x0);var events={'afterCreate':_0xb99f('0x3'),'afterUpdate':_0xb99f('0x4'),'afterDestroy':_0xb99f('0x5')};function emitEvent(_0x5891ab){return function(_0x23a1ef,_0x3e0d06,_0x58357b){PluginEvents[_0xb99f('0x6')](_0x5891ab+':'+_0x23a1ef['id'],_0x23a1ef);PluginEvents[_0xb99f('0x6')](_0x5891ab,_0x23a1ef);_0x58357b(null);};}for(var e in events){if(events[_0xb99f('0x7')](e)){var event=events[e];Plugin['hook'](e,emitEvent(event));}}module[_0xb99f('0x8')]=PluginEvents;
\ No newline at end of file