couple of issues w/ profile photo update propogation
This commit is contained in:
parent
70bcf000e3
commit
f4fd679928
7 changed files with 70 additions and 50 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue