function tripal_renew_file

3.x tripal.user.inc tripal_renew_file($fid)

User action to renew the expiration of a file.

Adds the current time and the expiration date (either from default or if the user has a custom expiration date) to tripal_expiration_files table.

1 string reference to 'tripal_renew_file'
tripal_menu in tripal/tripal.module
Implements hook_menu(). Defines all menu items needed by Tripal Core

File

tripal/includes/tripal.user.inc, line 118

Code

function tripal_renew_file($fid) {
  $file = file_load($fid);
  $success = tripal_reset_file_expiration($fid);

  if ($success) {
    drupal_set_message('Successfully updated expiration date.');
  }
  drupal_goto('user/' . $file->uid . '/files/');
}