From f5a2e59b6dc11e68efd1147168c7cc14f9c54761 Mon Sep 17 00:00:00 2001 From: drigato Date: Wed, 16 Apr 2014 12:15:34 -0400 Subject: [PATCH] Removed disk space check from StoredFile. This is now done in the Media controller --- airtime_mvc/application/models/StoredFile.php | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index b1ece8bd6..866e8327f 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -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 /*