function finder_admin_import in Finder 6
Same name and namespace in other branches
- 7 includes/finder.admin.inc \finder_admin_import()
Admin finder import page.
1 string reference to 'finder_admin_import'
- finder_menu in ./
finder.module - Implementation of hook_menu().
File
- includes/
finder.admin.inc, line 954 - The finder admin screens.
Code
function finder_admin_import() {
global $user;
$output;
if ($_POST['finder_code']) {
$finder_code = trim($_POST['finder_code']);
$import = finder_import($finder_code);
if (is_array($import)) {
foreach ($import as $finder) {
$new_finder = finder_clone($finder);
drupal_set_message(t("Imported !finder", array(
'!finder' => l($new_finder->title, 'admin/build/finder/' . $new_finder->finder_id . '/edit'),
)));
}
drupal_goto('admin/build/finder');
}
else {
$new_finder = finder_clone($import);
drupal_set_message(t("Imported !finder", array(
'!finder' => l($new_finder->title, 'admin/build/finder/' . $new_finder->finder_id . '/edit'),
)));
drupal_goto('admin/build/finder/' . $new_finder->finder_id . '/edit');
}
}
return drupal_get_form('finder_admin_import_form', $form);
}