X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fapi%2Fplugin%2Fplugin.events.js;h=b464859c5e2bf530d23f68ecf834d64e7deab51f;hb=d95c7680dfcaf10be192f8d0dd361fe585df15b7;hp=47c743409b0fd2fc0379ec19228b2c2c4a740f16;hpb=3a60439f3b647e2a7df8ce941316640492032b43;p=motion2.git diff --git a/server/api/plugin/plugin.events.js b/server/api/plugin/plugin.events.js index 47c7434..b464859 100644 --- a/server/api/plugin/plugin.events.js +++ b/server/api/plugin/plugin.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0c75=['hasOwnProperty','exports','../../mysqldb','setMaxListeners','save','update','remove','emit'];(function(_0x349eb0,_0x542752){var _0x5588c8=function(_0x4d1da9){while(--_0x4d1da9){_0x349eb0['push'](_0x349eb0['shift']());}};_0x5588c8(++_0x542752);}(_0x0c75,0x6a));var _0x50c7=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x0c75[_0x321bb2];return _0x9c12ed;};'use strict';var EventEmitter=require('events');var Plugin=require(_0x50c7('0x0'))['db']['Plugin'];var PluginEvents=new EventEmitter();PluginEvents[_0x50c7('0x1')](0x0);var events={'afterCreate':_0x50c7('0x2'),'afterUpdate':_0x50c7('0x3'),'afterDestroy':_0x50c7('0x4')};function emitEvent(_0x41ebd8){return function(_0x344563,_0x3c0314,_0x5d8fad){PluginEvents[_0x50c7('0x5')](_0x41ebd8+':'+_0x344563['id'],_0x344563);PluginEvents['emit'](_0x41ebd8,_0x344563);_0x5d8fad(null);};}for(var e in events){if(events[_0x50c7('0x6')](e)){var event=events[e];Plugin['hook'](e,emitEvent(event));}}module[_0x50c7('0x7')]=PluginEvents; \ No newline at end of file +var _0xf31b=['save','update','remove','emit','hook','exports','events','../../mysqldb','Plugin','setMaxListeners'];(function(_0x1bf8cc,_0x118778){var _0x322d20=function(_0x36953d){while(--_0x36953d){_0x1bf8cc['push'](_0x1bf8cc['shift']());}};_0x322d20(++_0x118778);}(_0xf31b,0x1a0));var _0xbf31=function(_0x37e31d,_0x1b58f6){_0x37e31d=_0x37e31d-0x0;var _0x28c7fa=_0xf31b[_0x37e31d];return _0x28c7fa;};'use strict';var EventEmitter=require(_0xbf31('0x0'));var Plugin=require(_0xbf31('0x1'))['db'][_0xbf31('0x2')];var PluginEvents=new EventEmitter();PluginEvents[_0xbf31('0x3')](0x0);var events={'afterCreate':_0xbf31('0x4'),'afterUpdate':_0xbf31('0x5'),'afterDestroy':_0xbf31('0x6')};function emitEvent(_0x5caf83){return function(_0x2a32c2,_0x205975,_0x5c989f){PluginEvents['emit'](_0x5caf83+':'+_0x2a32c2['id'],_0x2a32c2);PluginEvents[_0xbf31('0x7')](_0x5caf83,_0x2a32c2);_0x5c989f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Plugin[_0xbf31('0x8')](e,emitEvent(event));}}module[_0xbf31('0x9')]=PluginEvents; \ No newline at end of file