function lingotek_is_config_missing in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.module \lingotek_is_config_missing()
- 7.2 lingotek.module \lingotek_is_config_missing()
- 7.3 lingotek.module \lingotek_is_config_missing()
- 7.4 lingotek.module \lingotek_is_config_missing()
- 7.5 lingotek.module \lingotek_is_config_missing()
Checks any required configuration parameters are missing. (more detailed check than lingotek_is_module_setup())
5 calls to lingotek_is_config_missing()
- lingotek_admin_additional_translation_settings_form in ./
lingotek.admin.inc - Additional translation form
- lingotek_admin_entity_bundle_profiles_form in ./
lingotek.admin.inc - Content translation form
- lingotek_dashboard in ./
lingotek.dashboard.inc - Tab: Dashboard - The main Lingotek dashboard page.
- lingotek_is_module_setup in ./
lingotek.module - Checks to make sure the Lingotek Translation module setup completed successfully. If its not, the user is directed to the setup wizard.
- lingotek_setup in ./
lingotek.setup.inc - Routing: Returning User, New Account or Already Setup
File
- ./
lingotek.module, line 1890
Code
function lingotek_is_config_missing() {
$required_variables = array(
'lingotek_login_id',
'lingotek_community_identifier',
'lingotek_project',
'lingotek_workflow',
'lingotek_vault',
'lingotek_oauth_consumer_id',
'lingotek_oauth_consumer_secret',
);
foreach ($required_variables as $required_variable) {
$val = variable_get($required_variable, NULL);
if (empty($val)) {
if ($required_variable == 'lingotek_login_id') {
return 'admin/config/lingotek/new-account';
}
elseif ($required_variable == 'lingotek_community_identifier') {
return 'admin/config/lingotek/community-select';
}
elseif ($required_variable == 'lingotek_project' || $required_variable == 'lingotek_workflow' || $required_variable == 'lingotek_vault') {
return 'admin/config/lingotek/project-vault-select';
}
elseif ($required_variable == 'lingotek_oauth_consumer_id' || $required_variable == 'lingotek_oauth_consumer_secret') {
return TRUE;
}
}
}
// special handling of lingotek_enabled_fields, since none could be selected
$enabled_fields = variable_get('lingotek_enabled_fields', FALSE);
if (!isset($enabled_fields['node'])) {
return 'admin/config/lingotek/node-translation-settings';
}
if (module_exists('comment') && !isset($enabled_fields['comment'])) {
return 'admin/config/lingotek/comment-translation-settings';
}
if (variable_get('lingotek_translate_config', 'EMPTY') === 'EMPTY') {
return 'admin/config/lingotek/additional-translation-settings';
}
return FALSE;
// all required configuration variables are set
}