Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / api / plugin / plugin.events.js
index 47c7434..13c67ed 100644 (file)
@@ -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 _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