Bug 20305: Remove warnings from tools scripts
[koha.git] / tools / koha-news.pl
index 53b943d..7c20b5d 100755 (executable)
@@ -22,8 +22,7 @@
 # You should have received a copy of the GNU General Public License
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
-use strict;
-# use warnings; FIXME - Bug 2505
+use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Auth;
 use C4::Koha;
@@ -38,7 +37,7 @@ my $cgi = new CGI;
 
 my $id             = $cgi->param('id');
 my $title          = $cgi->param('title');
-my $new            = $cgi->param('new');
+my $content        = $cgi->param('content');
 my $expirationdate;
 if ( $cgi->param('expirationdate') ) {
     $expirationdate = output_pref({ dt => dt_from_string( scalar $cgi->param('expirationdate') ), dateformat => 'iso', dateonly => 1 });
@@ -107,7 +106,7 @@ elsif ( $op eq 'add' ) {
         add_opac_new(
             {
                 title          => $title,
-                new            => $new,
+                content        => $content,
                 lang           => $lang,
                 expirationdate => $expirationdate,
                 timestamp      => $timestamp,
@@ -127,7 +126,7 @@ elsif ( $op eq 'edit' ) {
         {
             idnew          => $id,
             title          => $title,
-            new            => $new,
+            content        => $content,
             lang           => $lang,
             expirationdate => $expirationdate,
             timestamp      => $timestamp,