require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
-define ( 'FRIENDICA_VERSION', '2.3.1237' );
+define ( 'FRIENDICA_VERSION', '2.3.1238' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1118 );
// audio/video
'mp3' => 'audio/mpeg',
+ 'wav' => 'audio/wav',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'ogg' => 'application/ogg',
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';
}
$filedata = @file_get_contents($src);
$mimetype = z_mime_content_type($filename);
- if(((! strlen($mimetype)) || ($mimetype === 'application/octet-stream')) && function_exists('mime_content_type'))
- $mimetype = mime_content_type($filename);
$hash = random_string();
$created = datetime_convert();
$r = q("INSERT INTO `attach` ( `uid`, `hash`, `filename`, `filetype`, `filesize`, `data`, `created`, `edited`, `allow_cid`, `allow_gid`,`deny_cid`, `deny_gid` )