You are here

function disqus_migrate_admin_import_settings_validate in Disqus 6

Validate callback for saving Disqus import settings

1 string reference to 'disqus_migrate_admin_import_settings_validate'
disqus_migrate_admin_import_settings in include/disqus_migrate.import.inc
Menu callback for import settings

File

include/disqus_migrate.import.inc, line 52

Code

function disqus_migrate_admin_import_settings_validate($form, &$form_state) {
  if ($form_state['values']['disqus_migrate_import_sync_enabled'] == 1) {

    // Check to make sure the Disqus API exists
    if (!_disqus_migrate_api_exists()) {
      form_set_error('sync][disqus_migrate_import_sync_enabled', t('To enable automatic importing, you need to first upload the Disqus API to your libraries folder.'));
    }
  }
}