From: Friendika Date: Fri, 20 May 2011 22:57:58 +0000 (-0700) Subject: photo upload plugin size limit is not working, call photo_end hooks in any error... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=db60d6d78f725d7d7ea40ff2ebe3f35df442e33a;p=friendica.git photo upload plugin size limit is not working, call photo_end hooks in any error return from mainline so html does not leak into json responses bug #77 --- diff --git a/mod/photos.php b/mod/photos.php index a2efda4385..17dbf00b6a 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -562,6 +562,7 @@ foreach($_FILES AS $key => $val) { if(($maximagesize) && ($filesize > $maximagesize)) { notice( t('Image exceeds size limit of ') . $maximagesize . EOL); @unlink($src); + call_hooks('photo_post_end',0); return; } @@ -574,6 +575,7 @@ foreach($_FILES AS $key => $val) { logger('mod/photos.php: photos_post(): unable to process image' , 'LOGGER_DEBUG'); notice( t('Unable to process image.') . EOL ); @unlink($src); + call_hooks('photo_post_end',0); killme(); }