You are here

function _patterns_io_import_pre_checkings in Patterns 7.2

Same name and namespace in other branches
  1. 7 includes/io/import.inc \_patterns_io_import_pre_checkings()

@file Importing Patterns from a file or using an URL.

1 call to _patterns_io_import_pre_checkings()
patterns_io_import_file in includes/io/import.inc

File

includes/io/import.inc, line 8
Importing Patterns from a file or using an URL.

Code

function _patterns_io_import_pre_checkings() {
  if (!patterns_parser_ready()) {
    $messages = t('No available patterns parser found. ');
    $messages .= t('Go to the !modules page to enable more Patterns parsers.', array(
      '!modules' => l(t('modules'), 'admin/modules'),
    ));
    drupal_set_message($messages, 'error');
    return FALSE;
  }
  $destination = patterns_path_get_files_dir();

  // If not automatically returns
  $diready = _patterns_import_check_dirs($destination);
  if (!$diready) {
    return FALSE;
  }
  return FALSE;
}