missing filename in uploaded photos (we don't really use this, but we will need to have a filename to export via DAV or API and the original filename would be the most likely choice).

This commit is contained in:
friendica 2014-01-22 23:54:14 -08:00
parent bc98f4ddf4
commit bf8e73ca73
2 changed files with 2 additions and 1 deletions

View File

@ -357,7 +357,7 @@ abstract class photo_driver {
dbesc($p['resource_id']), dbesc($p['resource_id']),
dbesc(datetime_convert()), dbesc(datetime_convert()),
dbesc(datetime_convert()), dbesc(datetime_convert()),
dbesc(basename($filename)), dbesc(basename($p['filename'])),
dbesc($this->getType()), dbesc($this->getType()),
dbesc($p['album']), dbesc($p['album']),
intval($this->getHeight()), intval($this->getHeight()),

View File

@ -77,6 +77,7 @@ function photo_upload($channel, $observer, $args) {
$filesize = intval($_FILES['userfile']['size']); $filesize = intval($_FILES['userfile']['size']);
$type = $_FILES['userfile']['type']; $type = $_FILES['userfile']['type'];
} }
if (! $type) if (! $type)
$type=guess_image_type($filename); $type=guess_image_type($filename);