|
|
@ -41,14 +41,16 @@ class fits { |
|
|
|
* @return type |
|
|
|
* @return type |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function extractFits($parameterArray, $dsid, $file, $file_ext) { |
|
|
|
function extractFits($parameterArray, $dsid, $file, $file_ext) { |
|
|
|
$file_name = '_' . $dsid . '.xml'; |
|
|
|
if (variable_get('enable_fits', TRUE) == 1) { |
|
|
|
$output = array(); |
|
|
|
$file_name = '_' . $dsid . '.xml'; |
|
|
|
exec('fits.sh -i ' . escapeshellarg($file) . '', $output); |
|
|
|
$output = array(); |
|
|
|
if ( !file_put_contents($file . $file_name, implode("\n", $output)) ) { |
|
|
|
exec(variable_get('fits_path', '/usr/local/bin/fits.sh') .' -i ' . escapeshellarg($file) . '', $output); |
|
|
|
exit("Error writing file: ". $file_name); |
|
|
|
if ( !file_put_contents($file . $file_name, implode("\n", $output)) ) { |
|
|
|
|
|
|
|
exit("Error writing file: ". $file.$file_name); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$_SESSION['fedora_ingest_files']["$dsid"] = $file . $file_name; |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
} |
|
|
|
} |
|
|
|
$_SESSION['fedora_ingest_files']["$dsid"] = $file . $file_name; |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|