diff options
Diffstat (limited to 'include')
-rwxr-xr-x | include/attach.php | 14 | ||||
-rwxr-xr-x | include/expire.php | 5 |
2 files changed, 13 insertions, 6 deletions
diff --git a/include/attach.php b/include/attach.php index 4001d2af1..6d611cec0 100755 --- a/include/attach.php +++ b/include/attach.php @@ -38,6 +38,7 @@ function z_mime_content_type($filename) { // audio/video 'mp3' => 'audio/mpeg', + 'wav' => 'audio/wav', 'qt' => 'video/quicktime', 'mov' => 'video/quicktime', 'ogg' => 'application/ogg', @@ -68,12 +69,13 @@ function z_mime_content_type($filename) { return $mime_types[$ext]; } } - elseif (function_exists('finfo_open')) { - $finfo = finfo_open(FILEINFO_MIME); - $mimetype = finfo_file($finfo, $filename); - finfo_close($finfo); - return $mimetype; - } +// can't use this because we're just passing a name, e.g. not a file that can be opened +// elseif (function_exists('finfo_open')) { +// $finfo = @finfo_open(FILEINFO_MIME); +// $mimetype = @finfo_file($finfo, $filename); +// @finfo_close($finfo); +// return $mimetype; +// } else { return 'application/octet-stream'; } diff --git a/include/expire.php b/include/expire.php index 64dbe2536..7608b9054 100755 --- a/include/expire.php +++ b/include/expire.php @@ -29,6 +29,11 @@ function expire_run($argv, $argc){ $a->set_baseurl(get_config('system','url')); + // physically remove anything that has been deleted from more than two months + + $r = q("delete from item where deleted = 1 and changed < UTC_TIMESTAMP() - INTERVAL 60 DAY"); + + logger('expire: start'); $r = q("SELECT `uid`,`username`,`expire` FROM `user` WHERE `expire` != 0"); |