getModuleName();
if ($moduleName == 'Activity') {
$arr = array('Task' => 'Calendar', 'Emails' => 'Emails');
$moduleName = $arr[getActivityType($entityData->getId())];
if ($moduleName == null) {
$moduleName = 'Events';
}
}
return $moduleName;
}
/**
* Insert redirection script
*/
function redirectTo($to, $message) {
?>
is_admin) === 'on';
}
/* function to check if the module has workflow
* @params :: $modulename - name of the module
*/
function checkModuleWorkflow($modulename) {
global $adb;
$tabid = getTabid($modulename);
$modules_not_supported = array('Documents', 'Calendar', 'Emails', 'Faq', 'Events', 'PBXManager', 'Users');
$query = "SELECT name FROM vtiger_tab WHERE name not in (" . generateQuestionMarks($modules_not_supported) . ") AND isentitytype=1 AND presence = 0 AND tabid = ?";
$result = $adb->pquery($query, array($modules_not_supported, $tabid));
$rows = $adb->num_rows($result);
if ($rows > 0) {
return true;
} else {
return false;
}
}
function vtGetModules($adb) {
$modules_not_supported = array('Documents', 'Emails', 'PBXManager');
$sql = "select distinct vtiger_field.tabid, name
from vtiger_field
inner join vtiger_tab
on vtiger_field.tabid=vtiger_tab.tabid
where vtiger_tab.name not in(" . generateQuestionMarks($modules_not_supported) . ") and vtiger_tab.isentitytype=1 and vtiger_tab.presence in (0,2) ";
$it = new SqlResultIterator($adb, $adb->pquery($sql, array($modules_not_supported)));
$modules = array();
foreach ($it as $row) {
$modules[] = $row->name;
}
return $modules;
}
}
?>