X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fapi%2Fplugin%2Fplugin.events.js;h=daeb44be5a7e253147d15ee444d4d7f87f427208;hb=07b7b3200d171aa6bbc6fe2ed92b6ea789d6486c;hp=b29ccbd3cf4542292c57a39f81f1dde4b88903c6;hpb=cc5ed542bde40ef5cb950540b6a10b4f2d3f9dc8;p=motion2.git diff --git a/server/api/plugin/plugin.events.js b/server/api/plugin/plugin.events.js index b29ccbd..daeb44b 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 _0x1224=['../../mysqldb','Plugin','setMaxListeners','save','update','emit','hasOwnProperty','hook','exports','events'];(function(_0x38ec30,_0x5c8b03){var _0x4f36b2=function(_0x23f092){while(--_0x23f092){_0x38ec30['push'](_0x38ec30['shift']());}};_0x4f36b2(++_0x5c8b03);}(_0x1224,0x10d));var _0x4122=function(_0x13bd92,_0x4eea2b){_0x13bd92=_0x13bd92-0x0;var _0x4a35c2=_0x1224[_0x13bd92];return _0x4a35c2;};'use strict';var EventEmitter=require(_0x4122('0x0'));var Plugin=require(_0x4122('0x1'))['db'][_0x4122('0x2')];var PluginEvents=new EventEmitter();PluginEvents[_0x4122('0x3')](0x0);var events={'afterCreate':_0x4122('0x4'),'afterUpdate':_0x4122('0x5'),'afterDestroy':'remove'};function emitEvent(_0x1b3b05){return function(_0x1f1533,_0x2f506b,_0x4d5e5b){PluginEvents[_0x4122('0x6')](_0x1b3b05+':'+_0x1f1533['id'],_0x1f1533);PluginEvents[_0x4122('0x6')](_0x1b3b05,_0x1f1533);_0x4d5e5b(null);};}for(var e in events){if(events[_0x4122('0x7')](e)){var event=events[e];Plugin[_0x4122('0x8')](e,emitEvent(event));}}module[_0x4122('0x9')]=PluginEvents; \ No newline at end of file +var _0x8ba0=['../../mysqldb','Plugin','setMaxListeners','save','emit','hook','exports','events'];(function(_0xa42d17,_0x4316ea){var _0x28e488=function(_0x1590b5){while(--_0x1590b5){_0xa42d17['push'](_0xa42d17['shift']());}};_0x28e488(++_0x4316ea);}(_0x8ba0,0x1c7));var _0x08ba=function(_0x298e13,_0x4f30e0){_0x298e13=_0x298e13-0x0;var _0x26d844=_0x8ba0[_0x298e13];return _0x26d844;};'use strict';var EventEmitter=require(_0x08ba('0x0'));var Plugin=require(_0x08ba('0x1'))['db'][_0x08ba('0x2')];var PluginEvents=new EventEmitter();PluginEvents[_0x08ba('0x3')](0x0);var events={'afterCreate':_0x08ba('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x1298ef){return function(_0x802b7e,_0x3defcd,_0x2dfaaf){PluginEvents[_0x08ba('0x5')](_0x1298ef+':'+_0x802b7e['id'],_0x802b7e);PluginEvents[_0x08ba('0x5')](_0x1298ef,_0x802b7e);_0x2dfaaf(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Plugin[_0x08ba('0x6')](e,emitEvent(event));}}module[_0x08ba('0x7')]=PluginEvents; \ No newline at end of file