|
|
|
@ -35,13 +35,13 @@ class fits {
|
|
|
|
|
* @return type |
|
|
|
|
*/ |
|
|
|
|
function extractFits($parameterArray, $dsid, $file, $file_ext) { |
|
|
|
|
$file_suffix = '_' . $dsid . '.xml'; |
|
|
|
|
$file_name = '_' . $dsid . '.xml'; |
|
|
|
|
$output = array(); |
|
|
|
|
exec('fits.sh -i ' . escapeshellarg($file) . '', $output); |
|
|
|
|
if ( !file_put_contents($file . $file_suffix, implode("\n", $output)) ) { |
|
|
|
|
if ( !file_put_contents($file . $file_name, implode("\n", $output)) ) { |
|
|
|
|
exit("Error writing file: ". $file_name); |
|
|
|
|
} |
|
|
|
|
$_SESSION['fedora_ingest_files']["$dsid"] = $file . $file_suffix; |
|
|
|
|
$_SESSION['fedora_ingest_files']["$dsid"] = $file . $file_name; |
|
|
|
|
return TRUE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|