couple of issues w/ profile photo update propogation

This commit is contained in:
Friendika 2010-11-09 18:24:35 -08:00
commit f4fd679928
7 changed files with 70 additions and 50 deletions

View file

@ -453,6 +453,14 @@ function photos_post(&$a) {
$filename = basename($_FILES['userfile']['name']);
$filesize = intval($_FILES['userfile']['size']);
$maximagesize = get_config('system','maximagesize');
if(($maximagesize) && ($filesize > $maximagesize)) {
notice( t('Image exceeds size limit of ') . $maximagesize . EOL);
@unlink($src);
return;
}
$imagedata = @file_get_contents($src);
$ph = new Photo($imagedata);