public function import_file($filename)
{
only_admin_access();
if (!is_file($filename)) {
return array('error' => 'You have not provided a existing backup to restore.');
}
$ext = get_file_extension($filename);
$import_method = strtolower('queue_import_' . $ext);
if (method_exists($this, $import_method)) {
ini_set('memory_limit', '512M');
set_time_limit(900);
return $this->{$import_method}($filename);
} else {
return array('error' => "Cannot find method for importing {$ext} files.");
}
}