From 890e0fd7eccff37bf84b511afee5c065fc3e0fa4 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Sat, 28 Mar 2015 16:38:52 +0100 Subject: [PATCH] gd_security_image.pl ready for use strict GetEditForm uses the second parameter to indicate that it's an upload. We need to pass it via NewGdSecurityImageGetEditForm to GdSecurityImageAddTo if we want to use it there. --- modules/gd_security_image.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/gd_security_image.pl b/modules/gd_security_image.pl index 87b6bbab..a3502a61 100644 --- a/modules/gd_security_image.pl +++ b/modules/gd_security_image.pl @@ -22,7 +22,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# use strict; #TODO what is $upload (344)? +use strict; AddModuleDescription('gd_security_image.pl'); @@ -328,7 +328,7 @@ sub NewGdSecurityImageDoPost { *GetEditForm = *NewGdSecurityImageGetEditForm; sub NewGdSecurityImageGetEditForm { - return GdSecurityImageAddTo(OldGdSecurityImageGetEditForm(@_)); + return GdSecurityImageAddTo(OldGdSecurityImageGetEditForm(@_), $_[1]); } *OldGdSecurityImageGetCommentForm = *GetCommentForm; @@ -339,7 +339,7 @@ sub NewGdSecurityImageGetCommentForm { } sub GdSecurityImageAddTo { - my $form = shift; + my ($form, $upload) = @_; if (not $upload and not GdSecurityImageException(GetId()) and not UserIsEditor()) {