Exemplo n.º 1
0
 /**
  * Update Events of the module
  * @access private
  */
 function update_Events($modulenode, $moduleInstance)
 {
     if (empty($modulenode->events) || empty($modulenode->events->event)) {
         return;
     }
     global $adb;
     // Deleting events before importing them
     $adb->query("DELETE FROM vtiger_eventhandlers WHERE handler_class  IN (SELECT handler_class FROM vtiger_eventhandler_module  WHERE module_name = '" . $moduleInstance->name . "')");
     $adb->query("DELETE FROM vtiger_eventhandler_module  WHERE module_name = '" . $moduleInstance->name . "'");
     if (Vtiger_Event::hasSupport()) {
         foreach ($modulenode->events->event as $eventnode) {
             $this->update_Event($modulenode, $moduleInstance, $eventnode);
         }
     }
 }
Exemplo n.º 2
0
 /**
  * Import Events of the module
  * @access private
  */
 function import_Events($modulenode, $moduleInstance)
 {
     if (empty($modulenode->events) || empty($modulenode->events->event)) {
         return;
     }
     if (Vtiger_Event::hasSupport()) {
         foreach ($modulenode->events->event as $eventnode) {
             $this->import_Event($modulenode, $moduleInstance, $eventnode);
         }
     }
 }
Exemplo n.º 3
0
 /**
  * Update Events of the module
  * @access private
  */
 function update_Events($modulenode, $moduleInstance)
 {
     if (empty($modulenode->events) || empty($modulenode->events->event)) {
         return;
     }
     $adb = PearDatabase::getInstance();
     // Deleting events before importing them
     $adb->delete('vtiger_eventhandlers', 'handler_class IN (SELECT handler_class FROM vtiger_eventhandler_module WHERE module_name = ? )', [$moduleInstance->name]);
     $adb->delete('vtiger_eventhandler_module', 'module_name = ?', [$moduleInstance->name]);
     if (Vtiger_Event::hasSupport()) {
         foreach ($modulenode->events->event as $eventnode) {
             $this->update_Event($modulenode, $moduleInstance, $eventnode);
         }
     }
 }