Built motion from commit e1760111.|2.6.18
[motion2.git] / server / api / plugin / plugin.events.js
index 9964fb1..b538716 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa30a=['../../mysqldb','Plugin','save','update','remove','emit','hook','exports','events'];(function(_0x19335b,_0x5ab757){var _0x4fda51=function(_0x182441){while(--_0x182441){_0x19335b['push'](_0x19335b['shift']());}};_0x4fda51(++_0x5ab757);}(_0xa30a,0xd7));var _0xaa30=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xa30a[_0x20a584];return _0x4b41a8;};'use strict';var EventEmitter=require(_0xaa30('0x0'));var Plugin=require(_0xaa30('0x1'))['db'][_0xaa30('0x2')];var PluginEvents=new EventEmitter();PluginEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xaa30('0x3'),'afterUpdate':_0xaa30('0x4'),'afterDestroy':_0xaa30('0x5')};function emitEvent(_0x2901b7){return function(_0x2a9b06,_0x271425,_0x102ad7){PluginEvents['emit'](_0x2901b7+':'+_0x2a9b06['id'],_0x2a9b06);PluginEvents[_0xaa30('0x6')](_0x2901b7,_0x2a9b06);_0x102ad7(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Plugin[_0xaa30('0x7')](e,emitEvent(event));}}module[_0xaa30('0x8')]=PluginEvents;
\ No newline at end of file
+var _0xc627=['update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb','Plugin','setMaxListeners'];(function(_0x330905,_0x267d9f){var _0x5c9360=function(_0x21b1a7){while(--_0x21b1a7){_0x330905['push'](_0x330905['shift']());}};_0x5c9360(++_0x267d9f);}(_0xc627,0x14a));var _0x7c62=function(_0x4a08d5,_0x7bdd7e){_0x4a08d5=_0x4a08d5-0x0;var _0x367b50=_0xc627[_0x4a08d5];return _0x367b50;};'use strict';var EventEmitter=require('events');var Plugin=require(_0x7c62('0x0'))['db'][_0x7c62('0x1')];var PluginEvents=new EventEmitter();PluginEvents[_0x7c62('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x7c62('0x3'),'afterDestroy':_0x7c62('0x4')};function emitEvent(_0x2f79e5){return function(_0x313d80,_0x121766,_0x35859a){PluginEvents[_0x7c62('0x5')](_0x2f79e5+':'+_0x313d80['id'],_0x313d80);PluginEvents[_0x7c62('0x5')](_0x2f79e5,_0x313d80);_0x35859a(null);};}for(var e in events){if(events[_0x7c62('0x6')](e)){var event=events[e];Plugin[_0x7c62('0x7')](e,emitEvent(event));}}module[_0x7c62('0x8')]=PluginEvents;
\ No newline at end of file