|
|
@ -522,10 +522,13 @@ function fedora_repository_replace_stream_form_submit($form, &$form_state) { |
|
|
|
$file = $form_state['values']['file']; |
|
|
|
$file = $form_state['values']['file']; |
|
|
|
$pid = $form_state['values']['pid']; |
|
|
|
$pid = $form_state['values']['pid']; |
|
|
|
$dsid = $form_state['values']['dsId']; |
|
|
|
$dsid = $form_state['values']['dsId']; |
|
|
|
|
|
|
|
$dsLabel = $form_state['values']['dsLabel']; |
|
|
|
// Remove the original file extension from the label and add the new one |
|
|
|
// Remove the original file extension from the label and add the new one |
|
|
|
$dsLabel = substr($form_state['values']['dsLabel'], 0, strrpos($form_state['values']['dsLabel'], '.')); |
|
|
|
$indexOfDot = strrpos($dsLabel,'.');//use strrpos to get the last dot |
|
|
|
|
|
|
|
if($indexOfDot !== FALSE){ |
|
|
|
|
|
|
|
$dsLabel = substr($dsLabel, 0, $indexOfDot); |
|
|
|
$dsLabel .= substr($file->filename, strrpos($file->filename, '.')); // Add the file extention to the end of the label.; |
|
|
|
$dsLabel .= substr($file->filename, strrpos($file->filename, '.')); // Add the file extention to the end of the label.; |
|
|
|
|
|
|
|
} |
|
|
|
module_load_include('inc', 'Fedora_Repository', 'MimeClass'); |
|
|
|
module_load_include('inc', 'Fedora_Repository', 'MimeClass'); |
|
|
|
module_load_include('inc', 'Fedora_Repository', 'ObjectHelper'); |
|
|
|
module_load_include('inc', 'Fedora_Repository', 'ObjectHelper'); |
|
|
|
module_load_include('inc', 'Fedora_Repository', 'ConnectionHelper'); |
|
|
|
module_load_include('inc', 'Fedora_Repository', 'ConnectionHelper'); |
|
|
|