Browse Source

Removed debug statements.

pull/476/head
MorganDawe 11 years ago
parent
commit
17f5e8b02c
  1. 12
      includes/utilities.inc

12
includes/utilities.inc

@ -46,6 +46,14 @@ function islandora_convert_bytes_to_human_readable($bytes, $precision = 2) {
}
}
/**
* Add a file as managed if is not already.
*
* @param string $file_name
* The given file name.
* @param string $file_uri
* The given file uri location.
*/
function islandora_temp_file_entry($file_name, $file_uri) {
// Check for this file in the file managed table.
$list = db_select('file_managed', 'c')
@ -54,16 +62,12 @@ function islandora_temp_file_entry($file_name, $file_uri) {
->execute();
$data = $list->fetchObject();
dsm($data, "existing: ");
if (!$data) {
$file = new stdClass();
$file->uri = $file_uri;
$file->filename = $file_name;
// Temporary.
$file->status = 0;
dsm($file, "file in islandora_temp_file_entry");
// Save the temp file to be cleaned up later via cron.
file_save($file);
}

Loading…
Cancel
Save