Built motion from commit fe909640.|2.6.8
[motion2.git] / server / api / plugin / plugin.events.js
index 5a55697..a07d804 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x80c3=['events','setMaxListeners','update','remove','emit','hook','exports'];(function(_0x4b609d,_0x5176f0){var _0x4c36d4=function(_0x25f10d){while(--_0x25f10d){_0x4b609d['push'](_0x4b609d['shift']());}};_0x4c36d4(++_0x5176f0);}(_0x80c3,0x18f));var _0x380c=function(_0x491a7f,_0x28bb80){_0x491a7f=_0x491a7f-0x0;var _0x3d8f44=_0x80c3[_0x491a7f];return _0x3d8f44;};'use strict';var EventEmitter=require(_0x380c('0x0'));var Plugin=require('../../mysqldb')['db']['Plugin'];var PluginEvents=new EventEmitter();PluginEvents[_0x380c('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0x380c('0x2'),'afterDestroy':_0x380c('0x3')};function emitEvent(_0x24728a){return function(_0x52fd7e,_0x565a08,_0x553158){PluginEvents[_0x380c('0x4')](_0x24728a+':'+_0x52fd7e['id'],_0x52fd7e);PluginEvents['emit'](_0x24728a,_0x52fd7e);_0x553158(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Plugin[_0x380c('0x5')](e,emitEvent(event));}}module[_0x380c('0x6')]=PluginEvents;
\ No newline at end of file
+var _0xfb65=['remove','emit','hook','exports','../../mysqldb','Plugin','save'];(function(_0x7d2c6e,_0x47a087){var _0x38aca9=function(_0x5ec86c){while(--_0x5ec86c){_0x7d2c6e['push'](_0x7d2c6e['shift']());}};_0x38aca9(++_0x47a087);}(_0xfb65,0x82));var _0x5fb6=function(_0x48ebdc,_0x4fbccc){_0x48ebdc=_0x48ebdc-0x0;var _0x1fecca=_0xfb65[_0x48ebdc];return _0x1fecca;};'use strict';var EventEmitter=require('events');var Plugin=require(_0x5fb6('0x0'))['db'][_0x5fb6('0x1')];var PluginEvents=new EventEmitter();PluginEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x5fb6('0x2'),'afterUpdate':'update','afterDestroy':_0x5fb6('0x3')};function emitEvent(_0x15d15c){return function(_0xca6345,_0xb5f7c4,_0x3a3b1b){PluginEvents[_0x5fb6('0x4')](_0x15d15c+':'+_0xca6345['id'],_0xca6345);PluginEvents['emit'](_0x15d15c,_0xca6345);_0x3a3b1b(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Plugin[_0x5fb6('0x5')](e,emitEvent(event));}}module[_0x5fb6('0x6')]=PluginEvents;
\ No newline at end of file