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

Fixes #324: Generalized moduleid lookup

parent b97bb8e9
No related branches found
No related tags found
No related merge requests found
...@@ -301,10 +301,11 @@ class Settings_Picklist_Module_Model extends Vtiger_Module_Model { ...@@ -301,10 +301,11 @@ class Settings_Picklist_Module_Model extends Vtiger_Module_Model {
public static function getPicklistSupportedModules() { public static function getPicklistSupportedModules() {
$db = PearDatabase::getInstance(); $db = PearDatabase::getInstance();
$unsupportedModuleIds = array(getTabId('Users'), getTabId('Emails'));
$query = "SELECT distinct vtiger_tab.tablabel, vtiger_tab.name as tabname $query = "SELECT distinct vtiger_tab.tablabel, vtiger_tab.name as tabname
FROM vtiger_tab FROM vtiger_tab
inner join vtiger_field on vtiger_tab.tabid=vtiger_field.tabid inner join vtiger_field on vtiger_tab.tabid=vtiger_field.tabid
WHERE uitype IN (15,33,16,114) and vtiger_field.tabid NOT IN (29,10) and vtiger_tab.presence != 1 and vtiger_field.presence in (0,2) WHERE uitype IN (15,33,16,114) and vtiger_field.tabid NOT IN (". implode(',', $unsupportedModuleIds) .") and vtiger_tab.presence != 1 and vtiger_field.presence in (0,2)
ORDER BY vtiger_tab.tabid ASC"; ORDER BY vtiger_tab.tabid ASC";
$result = $db->pquery($query, array()); $result = $db->pquery($query, array());
...@@ -559,4 +560,4 @@ class Settings_Picklist_Module_Model extends Vtiger_Module_Model { ...@@ -559,4 +560,4 @@ class Settings_Picklist_Module_Model extends Vtiger_Module_Model {
return true; return true;
} }
} }
\ No newline at end of file
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