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.
This commit is contained in:
Alex Schroeder
2015-03-28 16:38:52 +01:00
parent 7367b759b3
commit 890e0fd7ec

View File

@@ -22,7 +22,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# 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()) {