Bug 18639: (follow-up) Remove debugging code
[srvgit] / acqui / edifactmsgs.pl
index 0498b3d..12e2257 100755 (executable)
@@ -16,8 +16,7 @@
 # with Koha; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-use strict;
-use warnings;
+use Modern::Perl;
 
 use CGI;
 use Koha::Database;
@@ -32,15 +31,15 @@ my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
         query           => $q,
         type            => 'intranet',
         authnotrequired => 0,
-        flagsrequired   => { acquisition => 'manage_edi' },
+        flagsrequired   => { acquisition => 'edi_manage' },
         debug           => 1,
     }
 );
 
 my $schema = Koha::Database->new()->schema();
 my $cmd    = $q->param('op');
-if ( $cmd && $cmd == 'delete' ) {
-    my $id  = $q->param->('message_id');
+if ( $cmd && $cmd eq 'delete' ) {
+    my $id  = $q->param('message_id');
     my $msg = $schema->resultset('EdifactMessage')->find($id);
     $msg->deleted(1);
     $msg->update;