[mp_file] minor modifications in mp_file_commit

Korchkidu - October 19, 2009 - 12:58
Project:Ubercart Marketplace
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi all,

In mp_file_commit function, it would be useful to add the new filename and the new filepath of the file after renaming and copying it:

<?php
function mp_file_commit($node, $file_path, $description, $title, $fid) {

[...]

 
// Finally, copy the file to a more secure directory
 
copy($file_path, $dir . $new_name);

 
// Update node for further reuse
 
$node->new_filename = $new_name;
 
$node->new_filepath = $dir . $new_name;

[...]

}
?>

At least, it is useful to me...

Best regards.s
K.

 
 

Drupal is a registered trademark of Dries Buytaert.