Built motion from commit efa66e19.|2.6.22
[motion2.git] / server / api / plugin / plugin.events.js
index 61892ef..31da172 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2a07=['save','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','Plugin','setMaxListeners'];(function(_0x441aa9,_0x40d6a6){var _0x425d6a=function(_0x54b91a){while(--_0x54b91a){_0x441aa9['push'](_0x441aa9['shift']());}};_0x425d6a(++_0x40d6a6);}(_0x2a07,0x74));var _0x72a0=function(_0x2d7ec6,_0x9f52e6){_0x2d7ec6=_0x2d7ec6-0x0;var _0x50c714=_0x2a07[_0x2d7ec6];return _0x50c714;};'use strict';var EventEmitter=require(_0x72a0('0x0'));var Plugin=require(_0x72a0('0x1'))['db'][_0x72a0('0x2')];var PluginEvents=new EventEmitter();PluginEvents[_0x72a0('0x3')](0x0);var events={'afterCreate':_0x72a0('0x4'),'afterUpdate':'update','afterDestroy':_0x72a0('0x5')};function emitEvent(_0x5f7f29){return function(_0x135982,_0x45b155,_0x431f65){PluginEvents[_0x72a0('0x6')](_0x5f7f29+':'+_0x135982['id'],_0x135982);PluginEvents[_0x72a0('0x6')](_0x5f7f29,_0x135982);_0x431f65(null);};}for(var e in events){if(events[_0x72a0('0x7')](e)){var event=events[e];Plugin[_0x72a0('0x8')](e,emitEvent(event));}}module[_0x72a0('0x9')]=PluginEvents;
\ No newline at end of file
+var _0xcf71=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','Plugin','setMaxListeners'];(function(_0x1352fd,_0x166b29){var _0x4de3b6=function(_0x394c0d){while(--_0x394c0d){_0x1352fd['push'](_0x1352fd['shift']());}};_0x4de3b6(++_0x166b29);}(_0xcf71,0xba));var _0x1cf7=function(_0x42ba3b,_0x355441){_0x42ba3b=_0x42ba3b-0x0;var _0x17634b=_0xcf71[_0x42ba3b];return _0x17634b;};'use strict';var EventEmitter=require(_0x1cf7('0x0'));var Plugin=require(_0x1cf7('0x1'))['db'][_0x1cf7('0x2')];var PluginEvents=new EventEmitter();PluginEvents[_0x1cf7('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x1cf7('0x4'),'afterDestroy':_0x1cf7('0x5')};function emitEvent(_0xcc31bf){return function(_0x21307d,_0x11e462,_0x14d074){PluginEvents[_0x1cf7('0x6')](_0xcc31bf+':'+_0x21307d['id'],_0x21307d);PluginEvents[_0x1cf7('0x6')](_0xcc31bf,_0x21307d);_0x14d074(null);};}for(var e in events){if(events[_0x1cf7('0x7')](e)){var event=events[e];Plugin[_0x1cf7('0x8')](e,emitEvent(event));}}module[_0x1cf7('0x9')]=PluginEvents;
\ No newline at end of file