X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fapi%2Fplugin%2Fplugin.events.js;fp=server%2Fapi%2Fplugin%2Fplugin.events.js;h=ddcf14d273c9b76c173959134d4f3f57bc19548a;hb=142b2b07c26fb6697bb0d2f2a4a8c0253173e8fe;hp=13c67ed1a4681acd5e8b994316b078571a8d814a;hpb=bc8ba5d49091d4cd92a2c18e276791604cb31450;p=motion2.git diff --git a/server/api/plugin/plugin.events.js b/server/api/plugin/plugin.events.js index 13c67ed..ddcf14d 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 _0xaf11=['setMaxListeners','update','remove','emit','hasOwnProperty','exports','events','../../mysqldb','Plugin'];(function(_0x5b5daf,_0x141a14){var _0x32f3bf=function(_0x2ad237){while(--_0x2ad237){_0x5b5daf['push'](_0x5b5daf['shift']());}};_0x32f3bf(++_0x141a14);}(_0xaf11,0x12f));var _0x1af1=function(_0xf79c0,_0x15f4a2){_0xf79c0=_0xf79c0-0x0;var _0x36b431=_0xaf11[_0xf79c0];return _0x36b431;};'use strict';var EventEmitter=require(_0x1af1('0x0'));var Plugin=require(_0x1af1('0x1'))['db'][_0x1af1('0x2')];var PluginEvents=new EventEmitter();PluginEvents[_0x1af1('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x1af1('0x4'),'afterDestroy':_0x1af1('0x5')};function emitEvent(_0x28842d){return function(_0x53af48,_0xb0ace,_0x12eead){PluginEvents[_0x1af1('0x6')](_0x28842d+':'+_0x53af48['id'],_0x53af48);PluginEvents['emit'](_0x28842d,_0x53af48);_0x12eead(null);};}for(var e in events){if(events[_0x1af1('0x7')](e)){var event=events[e];Plugin['hook'](e,emitEvent(event));}}module[_0x1af1('0x8')]=PluginEvents; \ No newline at end of file +var _0x975b=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','Plugin'];(function(_0x5317b5,_0x4dfd6e){var _0x3b7ce2=function(_0xc146d6){while(--_0xc146d6){_0x5317b5['push'](_0x5317b5['shift']());}};_0x3b7ce2(++_0x4dfd6e);}(_0x975b,0x1c9));var _0xb975=function(_0x345673,_0xcbfb72){_0x345673=_0x345673-0x0;var _0x288132=_0x975b[_0x345673];return _0x288132;};'use strict';var EventEmitter=require(_0xb975('0x0'));var Plugin=require(_0xb975('0x1'))['db'][_0xb975('0x2')];var PluginEvents=new EventEmitter();PluginEvents[_0xb975('0x3')](0x0);var events={'afterCreate':_0xb975('0x4'),'afterUpdate':_0xb975('0x5'),'afterDestroy':_0xb975('0x6')};function emitEvent(_0x5e662b){return function(_0xa92c72,_0xfb173,_0x2007e4){PluginEvents[_0xb975('0x7')](_0x5e662b+':'+_0xa92c72['id'],_0xa92c72);PluginEvents[_0xb975('0x7')](_0x5e662b,_0xa92c72);_0x2007e4(null);};}for(var e in events){if(events[_0xb975('0x8')](e)){var event=events[e];Plugin[_0xb975('0x9')](e,emitEvent(event));}}module['exports']=PluginEvents; \ No newline at end of file