function import_fail in Import 6
A function menat to be called by modules implementing the Import API to indicate failure of an imported item.
Parameters
$data: An array containing impid and type so that we know what we are working with.
$msg: A string that serves as an optional message to associate with succesful import.
2 calls to import_fail()
- import_role_import_process in examples/
import_role/ import_role.module - import_user_import_process in examples/
import_user/ import_user.module - Implementation hook_import_process()
File
- ./
import.module, line 83
Code
function import_fail($data, $msg = '') {
db_query("INSERT INTO {import_fail} VALUES('%s','%s','%s')", $data->impid, $data->type, $msg);
db_query("DELETE from {import} where impid = '%s' AND type = '%s'", $data->impid, $data->type);
}