Skip to content
Snippets Groups Projects
Commit 83aaec93 authored by angelo paglialonga's avatar angelo paglialonga
Browse files

included checks for module existence, module is active and function path is reachable

parent 995ab935
No related branches found
No related tags found
2 merge requests!839#1639 mailconverter custom actions,!838standalone #1639 mailconverter custom actions
......@@ -54,15 +54,20 @@ $adb->pquery('ALTER TABLE `vtiger_mailscanner_actions`
function executeMethod($moduleName, $methodName,$params){
$adb = $this->adb;
$moduleNameModel=Vtiger_Module_Model::getInstance($moduleName);
if($moduleNameModel){
if($moduleNameModel->isActive()){
$result = $adb->pquery("select function_path, function_name from vtiger_mailscanner_entitymethod where module_name=? and method_name=?", array($moduleName, $methodName));
if($adb->num_rows($result)!=0){
$data = $adb->raw_query_result_rowdata($result, 0);
$functionPath = $data['function_path'];
$functionName = $data['function_name'];
if(file_exists($functionPath)){
require_once($functionPath);
$functionName($params);
$functionName($params);}
}
}
}
}
function methodsForModule($moduleName){
......
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