aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-09 18:24:35 -0800
committerFriendika <info@friendika.com>2010-11-09 18:24:35 -0800
commitf4fd67992812c5c356ff51e875077921a2222d90 (patch)
tree0ca3e25a5760c3d9d1598bca716f24767fe234fa /mod/photos.php
parent70bcf000e3662266df8683d57269a0b75af60330 (diff)
downloadvolse-hubzilla-f4fd67992812c5c356ff51e875077921a2222d90.tar.gz
volse-hubzilla-f4fd67992812c5c356ff51e875077921a2222d90.tar.bz2
volse-hubzilla-f4fd67992812c5c356ff51e875077921a2222d90.zip
couple of issues w/ profile photo update propogation
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/mod/photos.php b/mod/photos.php
index e1926bb56..addc04d76 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -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);