You are here

function lingotek_is_config_missing in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 7.7 lingotek.module \lingotek_is_config_missing()
  2. 7.2 lingotek.module \lingotek_is_config_missing()
  3. 7.3 lingotek.module \lingotek_is_config_missing()
  4. 7.5 lingotek.module \lingotek_is_config_missing()
  5. 7.6 lingotek.module \lingotek_is_config_missing()

Checks any required configuration parameters are missing. (more detailed check than lingotek_is_module_setup())

6 calls to lingotek_is_config_missing()
lingotek_admin_additional_translation_settings_form in ./lingotek.admin.inc
Additional translation form
lingotek_admin_comment_translation_settings_form in ./lingotek.admin.inc
Additional translation form
lingotek_admin_node_translation_settings_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.

... See full list

File

./lingotek.module, line 1520

Code

function lingotek_is_config_missing() {
  $required_variables = array(
    'lingotek_login_id',
    'lingotek_community_identifier',
    'lingotek_project',
    'lingotek_workflow',
    'lingotek_vault',
    'lingotek_enabled_fields',
    'lingotek_translate_comments_node_types',
    '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_enabled_fields') {
        return 'admin/config/lingotek/node-translation-settings';
      }
      elseif ($required_variable == 'lingotek_translate_comments_node_types') {
        return 'admin/config/lingotek/comment-translation-settings';
      }
      elseif ($required_variable == 'lingotek_oauth_consumer_id' || $required_variable == 'lingotek_oauth_consumer_secret') {
        return TRUE;
      }
    }
  }
  return FALSE;

  // all required configuration variables are set
}