Bug 7567: QA followup: remove useless $parameters hashref
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 27 Mar 2014 12:15:14 +0000 (13:15 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 7 Apr 2014 18:14:20 +0000 (18:14 +0000)
This hashref is useless, it is only used once.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
tools/koha-news.pl

index 734db7c..aec9486 100755 (executable)
@@ -96,30 +96,32 @@ if ( $op eq 'add_form' ) {
     }
 }
 elsif ( $op eq 'add' ) {
-    my $parameters = {
-                      title          => $title,
-                      new            => $new,
-                      lang           => $lang,
-                      expirationdate => $expirationdate,
-                      timestamp      => $timestamp,
-                      number         => $number,
-                      branchcode     => $branchcode,
-                  };
-    add_opac_new( $parameters );
+    add_opac_new(
+        {
+            title          => $title,
+            new            => $new,
+            lang           => $lang,
+            expirationdate => $expirationdate,
+            timestamp      => $timestamp,
+            number         => $number,
+            branchcode     => $branchcode,
+        }
+    );
     print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
 }
 elsif ( $op eq 'edit' ) {
-    my $parameters = {
-                      idnew          => $id,
-                      title          => $title,
-                      new            => $new,
-                      lang           => $lang,
-                      expirationdate => $expirationdate,
-                      timestamp      => $timestamp,
-                      number         => $number,
-                      branchcode     => $branchcode,
-                  };
-    upd_opac_new( $parameters );
+    upd_opac_new(
+        {
+            idnew          => $id,
+            title          => $title,
+            new            => $new,
+            lang           => $lang,
+            expirationdate => $expirationdate,
+            timestamp      => $timestamp,
+            number         => $number,
+            branchcode     => $branchcode,
+        }
+    );
     print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
 }
 elsif ( $op eq 'del' ) {