finder_admin_import

  1. finder
    1. 6.x-1.x
    2. 7.x-1.x
Versions
6.x-1.x – 7.x-1.x finder_admin_import()

Admin finder import page.

Code

includes/finder.admin.inc, line 917

<?php
function finder_admin_import() {
  global $user;
  if (isset($_POST['finder_code']) && !empty($_POST['finder_code'])) {
    $finder_code = trim($_POST['finder_code']);
    $import = finder_import($finder_code);
    if (is_array($import)) {
      foreach ($import as $finder) {
        finder_invoke_finderapi($finder, 'finder_import');

        // Handle custom matching.
        finder_admin_import_custom_matching($import);

        $new_finder = finder_clone($finder);
        drupal_set_message(t('Imported !finder', array('!finder' => l($new_finder->title, 'admin/structure/finder/' . $new_finder->finder_id . '/edit'))));
      }
      drupal_goto('admin/structure/finder');
    }
    else {
      finder_invoke_finderapi($import, 'finder_import');

      // Handle custom matching.
      finder_admin_import_custom_matching($import);

      $new_finder = finder_clone($import);
      drupal_set_message(t('Imported !finder', array('!finder' => l($new_finder->title, 'admin/structure/finder/' . $new_finder->finder_id . '/edit'))));
      drupal_goto('admin/structure/finder/' . $new_finder->finder_id . '/edit');
    }
  }
  return drupal_get_form('finder_admin_import_form');
}
?>

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.