Built motion from commit 616d3211.|2.6.4
[motion2.git] / server / api / plugin / plugin.events.js
index bc71b63..b3e0bc5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x627e=['events','../../mysqldb','Plugin','setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports'];(function(_0xea8947,_0x1b573d){var _0x2455e9=function(_0x18771e){while(--_0x18771e){_0xea8947['push'](_0xea8947['shift']());}};_0x2455e9(++_0x1b573d);}(_0x627e,0x14a));var _0xe627=function(_0x2a5b55,_0xcbc707){_0x2a5b55=_0x2a5b55-0x0;var _0x591d68=_0x627e[_0x2a5b55];return _0x591d68;};'use strict';var EventEmitter=require(_0xe627('0x0'));var Plugin=require(_0xe627('0x1'))['db'][_0xe627('0x2')];var PluginEvents=new EventEmitter();PluginEvents[_0xe627('0x3')](0x0);var events={'afterCreate':_0xe627('0x4'),'afterUpdate':'update','afterDestroy':_0xe627('0x5')};function emitEvent(_0x328881){return function(_0x2abdc7,_0x59a2c8,_0x52923f){PluginEvents['emit'](_0x328881+':'+_0x2abdc7['id'],_0x2abdc7);PluginEvents[_0xe627('0x6')](_0x328881,_0x2abdc7);_0x52923f(null);};}for(var e in events){if(events[_0xe627('0x7')](e)){var event=events[e];Plugin[_0xe627('0x8')](e,emitEvent(event));}}module[_0xe627('0x9')]=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