Merge branch 'cc-5709-airtime-analyzer' of github.com:sourcefabric/Airtime into cc-5709-airtime-analyzer

This commit is contained in:
Albert Santoni 2014-04-16 13:05:24 -04:00
commit d6bc3aa4cc
1 changed files with 0 additions and 23 deletions

View File

@ -899,19 +899,6 @@ SQL;
return $results;
}
/**
* Check, using disk_free_space, the space available in the $destination_folder folder to see if it has
* enough space to move the $audio_file into and report back to the user if not.
**/
public static function isEnoughDiskSpaceToCopy($destination_folder, $audio_file)
{
//check to see if we have enough space in the /organize directory to copy the file
$freeSpace = disk_free_space($destination_folder);
$fileSize = filesize($audio_file);
return $freeSpace >= $fileSize;
}
/**
* Copy a newly uploaded audio file from its temporary upload directory
* on the local disk (like /tmp) over to Airtime's "stor" directory,
@ -952,16 +939,6 @@ SQL;
Logging::info("Warning: couldn't change permissions of $audio_file to 0644");
}
// Check if we have enough space before copying
if (!self::isEnoughDiskSpaceToCopy($stor, $audio_file)) {
$freeSpace = disk_free_space($stor);
$fileSize = filesize($audio_file);
throw new Exception(sprintf(_("The file was not uploaded, there is "
."%s MB of disk space left and the file you are "
."uploading has a size of %s MB."), $freeSpace, $fileSize));
}
// Check if liquidsoap can play this file
// TODO: Move this to airtime_analyzer
/*