From a2c6bd372f776fdafe94133a2ccf5154918b50b3 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Sun, 29 Mar 2015 23:18:07 +0200 Subject: [PATCH] upgrade.pl uses strict DoUpgrade is an alias for DoBrowseRequest which doesn't get $id as a first parameter like many actions do. Therefore determine $id like DoBrowseRequest does: call GetId. --- modules/upgrade.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/upgrade.pl b/modules/upgrade.pl index de34d4e7..bd546c99 100644 --- a/modules/upgrade.pl +++ b/modules/upgrade.pl @@ -1,4 +1,4 @@ -# Copyright (C) 2014 Alex Schroeder +# Copyright (C) 2014–2015 Alex Schroeder # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -12,7 +12,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 $id (46) ? +use strict; use utf8; @@ -38,12 +38,11 @@ sub UpgradeNewInitVariables { *DoBrowseRequest = *DoUpgrade; sub DoUpgrade { - # The only thing allowed besides upgrading is login and unlock my $action = lc(GetParam('action', '')); if (($action eq 'password' or $action eq 'unlock') and $Action{$action}) { - return &{$Action{$action}}($id); + return &{$Action{$action}}(GetId()); } # Only admins may upgrade