Skip to content
Snippets Groups Projects
Commit d78cf033 authored by Prasad's avatar Prasad
Browse files

Merge branch 'convertlead_phone_entry' into 'master'

Fixes #30 - Converting Lead doesn't remove the Lead's Phone information from vti…

Fixes #30 - Converting Lead doesn't remove the Lead's Phone information from vtiger_pbxmanager_phonelookup table

See merge request !294
parents 5ff61471 f9125c7e
No related branches found
No related tags found
Loading
......@@ -38,7 +38,7 @@ if(defined('VTIGER_UPGRADE')) {
foreach ($updateModulesList as $moduleName => $packagePath) {
$moduleInstance = Vtiger_Module::getInstance($moduleName);
if($moduleInstance) {
updateVtlibModule($moduleName, $packagepath);
updateVtlibModule($moduleName, $packagePath);
}
}
}
\ No newline at end of file
No preview for this file type
......@@ -113,6 +113,7 @@ class PBXManager extends CRMEntity {
} else if ($event_type == 'module.preupdate') {
// TODO Handle actions before this module is updated.
} else if ($event_type == 'module.postupdate') {
$this->registerLookupEvents();
// TODO Handle actions before this module is updated.
}
}
......@@ -156,6 +157,7 @@ class PBXManager extends CRMEntity {
$restoreEvent = 'vtiger.entity.afterrestore';
$batchSaveEvent = 'vtiger.batchevent.save';
$batchDeleteEvent = 'vtiger.batchevent.delete';
$convertLeadEvent = 'vtiger.lead.convertlead';
$handler_path = 'modules/PBXManager/PBXManagerHandler.php';
$className = 'PBXManagerHandler';
$batchEventClassName = 'PBXManagerBatchHandler';
......@@ -164,6 +166,7 @@ class PBXManager extends CRMEntity {
$EventManager->registerHandler($restoreEvent, $handler_path, $className);
$EventManager->registerHandler($batchSaveEvent, $handler_path, $batchEventClassName);
$EventManager->registerHandler($batchDeleteEvent, $handler_path, $batchEventClassName);
$EventManager->registerHandler($convertLeadEvent, $handler_path, $className);
$log->fatal('Lookup Events Registered');
}
......
......@@ -20,8 +20,12 @@ class PBXManagerHandler extends VTEventHandler {
if ($eventName == 'vtiger.entity.aftersave') {
PBXManagerHandler::handlePhoneLookUpSaveEvent($entityData, $moduleName);
}
if($eventName == 'vtiger.entity.afterdelete'){
if ($eventName == 'vtiger.lead.convertlead' && $moduleName == 'Leads') {
PBXManagerHandler::handlePhoneLookupDeleteEvent($entityData);
}
if($eventName == 'vtiger.entity.afterdelete'){
PBXManagerHandler::handlePhoneLookupDeleteEvent($entityData);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment