[Legacy] Add fallback for missing labels

This commit is contained in:
Jack Anderson 2024-08-06 10:34:42 +01:00
parent 43d85baa10
commit df9cb8356b
6 changed files with 35 additions and 35 deletions

View file

@ -44,11 +44,11 @@ if (!defined('sugarEntry') || !sugarEntry) {
global $mod_strings;
$module_menu = array();
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=EditView&type=personal", $mod_strings['LNK_LIST_CREATE_NEW_PERSONAL'],"CreatePersonal");
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=EditView&type=personal", $mod_strings['LNK_LIST_CREATE_NEW_PERSONAL'] ?? '',"CreatePersonal");
if (is_admin($GLOBALS['current_user'])) {
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=EditView&type=group", $mod_strings['LNK_LIST_CREATE_NEW_GROUP'],"CreateGroup");
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=EditView&type=group", $mod_strings['LNK_LIST_CREATE_NEW_GROUP'] ?? '',"CreateGroup");
}
$module_menu[]= array("index.php?module=InboundEmail&action=index", $mod_strings['LNK_LIST_INBOUND_EMAILS'],"List");
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=index", $mod_strings['LNK_LIST_OUTBOUND_EMAILS'],"List");
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=index", $mod_strings['LNK_LIST'],"List");
$module_menu[]= array("index.php?module=ExternalOAuthProvider&action=index", $mod_strings['LNK_LIST_EXTERNAL_OAUTH_PROVIDERS'],"List");
$module_menu[]= array("index.php?module=InboundEmail&action=index", $mod_strings['LNK_LIST_INBOUND_EMAILS'] ?? '',"List");
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=index", $mod_strings['LNK_LIST_OUTBOUND_EMAILS'] ?? '',"List");
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=index", $mod_strings['LNK_LIST'] ?? '',"List");
$module_menu[]= array("index.php?module=ExternalOAuthProvider&action=index", $mod_strings['LNK_LIST_EXTERNAL_OAUTH_PROVIDERS'] ?? '',"List");

View file

@ -44,11 +44,11 @@ if (!defined('sugarEntry') || !sugarEntry) {
global $mod_strings;
$module_menu = array();
$module_menu[]= array("index.php?module=ExternalOAuthProvider&action=EditView&type=personal", $mod_strings['LNK_LIST_CREATE_NEW_PERSONAL'],"CreatePersonal");
$module_menu[]= array("index.php?module=ExternalOAuthProvider&action=EditView&type=personal", $mod_strings['LNK_LIST_CREATE_NEW_PERSONAL'] ?? '',"CreatePersonal");
if (is_admin($GLOBALS['current_user'])) {
$module_menu[]= array("index.php?module=ExternalOAuthProvider&action=EditView&type=group", $mod_strings['LNK_LIST_CREATE_NEW_GROUP'],"CreateGroup");
$module_menu[]= array("index.php?module=ExternalOAuthProvider&action=EditView&type=group", $mod_strings['LNK_LIST_CREATE_NEW_GROUP'] ?? '',"CreateGroup");
}
$module_menu[]= array("index.php?module=InboundEmail&action=index", $mod_strings['LNK_LIST_INBOUND_EMAILS'],"List");
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=index", $mod_strings['LNK_LIST_OUTBOUND_EMAILS'],"List");
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=index", $mod_strings['LNK_LIST_EXTERNAL_OAUTH_CONNECTION'],"List");
$module_menu[]= array("index.php?module=ExternalOAuthProvider&action=index", $mod_strings['LNK_LIST'],"List");
$module_menu[]= array("index.php?module=InboundEmail&action=index", $mod_strings['LNK_LIST_INBOUND_EMAILS'] ?? '',"List");
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=index", $mod_strings['LNK_LIST_OUTBOUND_EMAILS'] ?? '',"List");
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=index", $mod_strings['LNK_LIST_EXTERNAL_OAUTH_CONNECTION'] ?? '',"List");
$module_menu[]= array("index.php?module=ExternalOAuthProvider&action=index", $mod_strings['LNK_LIST'] ?? '',"List");

View file

@ -44,16 +44,16 @@ if (!defined('sugarEntry') || !sugarEntry) {
global $mod_strings;
$module_menu = array();
$module_menu[]= array("index.php?module=InboundEmail&action=EditView&is_personal=1&type=personal", $mod_strings['LNK_LIST_CREATE_NEW_PERSONAL'],"CreatePersonal");
$module_menu[]= array("index.php?module=InboundEmail&action=EditView&is_personal=1&type=personal", $mod_strings['LNK_LIST_CREATE_NEW_PERSONAL'] ?? '',"CreatePersonal");
if (is_admin($GLOBALS['current_user'])) {
$module_menu[]= array("index.php?module=InboundEmail&action=EditView&type=group", $mod_strings['LNK_LIST_CREATE_NEW_GROUP'],"CreateGroup");
$module_menu[]= array("index.php?module=InboundEmail&action=EditView&mailbox_type=bounce&type=bounce", $mod_strings['LNK_LIST_CREATE_NEW_BOUNCE'],"CreateBounce");
$module_menu[]= array("index.php?module=InboundEmail&action=EditView&type=group", $mod_strings['LNK_LIST_CREATE_NEW_GROUP'] ?? '',"CreateGroup");
$module_menu[]= array("index.php?module=InboundEmail&action=EditView&mailbox_type=bounce&type=bounce", $mod_strings['LNK_LIST_CREATE_NEW_BOUNCE'] ?? '',"CreateBounce");
}
$module_menu[]= array("index.php?module=InboundEmail&action=index", $mod_strings['LNK_LIST_MAILBOXES'],"List");
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=index", $mod_strings['LNK_LIST_OUTBOUND_EMAILS'],"List");
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=index", $mod_strings['LNK_EXTERNAL_OAUTH_CONNECTIONS'],"List");
$module_menu[]= array("index.php?module=InboundEmail&action=index", $mod_strings['LNK_LIST_MAILBOXES'] ?? '',"List");
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=index", $mod_strings['LNK_LIST_OUTBOUND_EMAILS'] ?? '',"List");
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=index", $mod_strings['LNK_EXTERNAL_OAUTH_CONNECTIONS'] ?? '',"List");
if (is_admin($GLOBALS['current_user'])) {
$module_menu[]= array("index.php?module=Schedulers&action=index", $mod_strings['LNK_LIST_SCHEDULER'],"Schedulers");
$module_menu[]= array("index.php?module=Schedulers&action=index", $mod_strings['LNK_LIST_SCHEDULER'] ?? '',"Schedulers");
}
//array("index.php?module=Queues&action=Seed", $mod_strings['LNK_SEED_QUEUES'],"CustomQueries"),

View file

@ -43,12 +43,12 @@ if (!defined('sugarEntry') || !sugarEntry) {
global $mod_strings;
$module_menu = array();
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=EditView&type=user", $mod_strings['LNK_LIST_CREATE_NEW_PERSONAL'],"CreatePersonal");
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=EditView&type=user", $mod_strings['LNK_LIST_CREATE_NEW_PERSONAL'] ?? '',"CreatePersonal");
if (is_admin($GLOBALS['current_user'])) {
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=EditView&type=group", $mod_strings['LNK_LIST_CREATE_NEW_GROUP'],"CreateGroup");
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=EditView&type=group", $mod_strings['LNK_LIST_CREATE_NEW_GROUP'] ?? '',"CreateGroup");
}
$module_menu[]= array("index.php?module=InboundEmail&action=index", $mod_strings['LNK_LIST_INBOUND_EMAIL_ACCOUNTS'],"List");
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=index", $mod_strings['LNK_LIST'],"List");
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=index", $mod_strings['LNK_EXTERNAL_OAUTH_CONNECTIONS'],"List");
$module_menu[]= array("index.php?module=InboundEmail&action=index", $mod_strings['LNK_LIST_INBOUND_EMAIL_ACCOUNTS'] ?? '',"List");
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=index", $mod_strings['LNK_LIST'] ?? '',"List");
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=index", $mod_strings['LNK_EXTERNAL_OAUTH_CONNECTIONS'] ?? '',"List");

View file

@ -65,7 +65,7 @@ if (ACLController::checkAccess('SurveyResponses', 'list', true)) {
$module_menu[] =
array(
"index.php?module=SurveyResponses&action=index&return_module=Surveys&return_action=index",
$mod_strings['LNK_LIST_SURVEY_RESPONSES'],
$mod_strings['LNK_LIST_SURVEY_RESPONSES'] ?? '',
"List",
'SurveyResponses'
);

View file

@ -48,25 +48,25 @@ $module_menu = array();
if ($GLOBALS['current_user']->isAdminForModule('Users')
) {
$module_menu = array(
array("index.php?module=Users&action=EditView&return_module=Users&return_action=DetailView", $mod_strings['LNK_NEW_USER'], "Create"),
array("index.php?module=Users&action=EditView&usertype=group&return_module=Users&return_action=DetailView", $mod_strings['LNK_NEW_GROUP_USER'], "Create_Group_User")
array("index.php?module=Users&action=EditView&return_module=Users&return_action=DetailView", $mod_strings['LNK_NEW_USER'] ?? '', "Create"),
array("index.php?module=Users&action=EditView&usertype=group&return_module=Users&return_action=DetailView", $mod_strings['LNK_NEW_GROUP_USER'] ?? '', "Create_Group_User")
);
$module_menu[] = array("index.php?module=Users&action=ListView&return_module=Users&return_action=DetailView", $mod_strings['LNK_USER_LIST'], "List");
$module_menu[] = array("index.php?module=Users&action=ListView&return_module=Users&return_action=DetailView", $mod_strings['LNK_USER_LIST'] ?? '', "List");
$module_menu[] = array("index.php?module=Import&action=Step1&import_module=Users&return_module=Users&return_action=index", $mod_strings['LNK_IMPORT_USERS'], "Import", 'Contacts');
$module_menu[] = array("index.php?module=Import&action=Step1&import_module=Users&return_module=Users&return_action=index", $mod_strings['LNK_IMPORT_USERS'] ?? '', "Import", 'Contacts');
}
$sg_mod_strings = return_module_language($current_language, 'SecurityGroups');
$module_menu[] = array("index.php?module=SecurityGroups&action=EditView&return_module=SecurityGroups&return_action=DetailView", $sg_mod_strings['LNK_NEW_RECORD'], "Create_Security_Group");
$module_menu[] = array("index.php?module=SecurityGroups&action=ListView&return_module=SecurityGroups&return_action=ListView", $sg_mod_strings['LBL_LIST_FORM_TITLE'], "Security_Groups");
$module_menu[] = array("index.php?module=SecurityGroups&action=EditView&return_module=SecurityGroups&return_action=DetailView", $sg_mod_strings['LNK_NEW_RECORD'] ?? '', "Create_Security_Group");
$module_menu[] = array("index.php?module=SecurityGroups&action=ListView&return_module=SecurityGroups&return_action=ListView", $sg_mod_strings['LBL_LIST_FORM_TITLE'] ?? '', "Security_Groups");
if (is_admin($current_user)) {
global $current_language;
$admin_mod_strings = return_module_language($current_language, 'Administration');
$module_menu[] = array("index.php?module=ACLRoles&action=index&return_module=SecurityGroups&return_action=ListView", $admin_mod_strings['LBL_MANAGE_ROLES_TITLE'], "Role_Management");
$module_menu[] = array("index.php?module=SecurityGroups&action=config&return_module=SecurityGroups&return_action=ListView", $admin_mod_strings['LBL_CONFIG_SECURITYGROUPS_TITLE'], "Security_Suite_Settings");
$module_menu[] = array("index.php?module=ACLRoles&action=index&return_module=SecurityGroups&return_action=ListView", $admin_mod_strings['LBL_MANAGE_ROLES_TITLE'] ?? '', "Role_Management");
$module_menu[] = array("index.php?module=SecurityGroups&action=config&return_module=SecurityGroups&return_action=ListView", $admin_mod_strings['LBL_CONFIG_SECURITYGROUPS_TITLE'] ?? '', "Security_Suite_Settings");
}
$module_menu[]= array("index.php?module=InboundEmail&action=index", $mod_strings['LNK_LIST_INBOUND_EMAIL_ACCOUNTS'] ?? '',"List");
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=index", $mod_strings['LNK_LIST_OUTBOUND_EMAIL_ACCOUNTS'],"List");
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=index", $mod_strings['LNK_EXTERNAL_OAUTH_CONNECTIONS'],"List");
$module_menu[]= array("index.php?module=OutboundEmailAccounts&action=index", $mod_strings['LNK_LIST_OUTBOUND_EMAIL_ACCOUNTS'] ?? '',"List");
$module_menu[]= array("index.php?module=ExternalOAuthConnection&action=index", $mod_strings['LNK_EXTERNAL_OAUTH_CONNECTIONS'] ?? '',"List");