From e606c24570882c913b3f66bd03ac4197304b19f8 Mon Sep 17 00:00:00 2001
From: Koha instance kohadev-koha <kohadev-koha@kohadevbox>
Date: Tue, 1 Jun 2021 08:15:49 +0000
Subject: [PATCH] Bug 26205: (QA follow-up) Change OPACNEWS to just NEWS

As news are usable in OPAC and staff interface, I suggest changing the code
to just be NEWS instead of OPACNEWS.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
---
 C4/NewsChannels.pm                                       | 12 ++++++------
 koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm
index 28a2d6074d..4b3c68311f 100644
--- a/C4/NewsChannels.pm
+++ b/C4/NewsChannels.pm
@@ -71,9 +71,9 @@ sub add_opac_new {
         $sth->execute(@values);
         $retval = 1;
 
-        #log the NEW OPAC news entry
+        #Log new news entry
         if (C4::Context->preference("NewsLog")) {
-                logaction('OPACNEWS', 'ADD' , undef, $href_entry->{lang} . ' | ' . $href_entry->{content});
+                logaction('NEWS', 'ADD' , undef, $href_entry->{lang} . ' | ' . $href_entry->{content});
         }
     }
     return $retval;
@@ -116,9 +116,9 @@ sub upd_opac_new {
         $retval = 1;
     }
 
-    #log new OPAC news modification
+    #Log news entry modification
     if (C4::Context->preference("NewsLog")) {
-            logaction('OPACNEWS', 'MODIFY' , undef, $href_entry->{lang} . ' | ' . $href_entry->{content});
+            logaction('NEWS', 'MODIFY' , undef, $href_entry->{lang} . ' | ' . $href_entry->{content});
     }
     return $retval;
 }
@@ -127,11 +127,11 @@ sub del_opac_new {
     my ($ids) = @_;
     if ($ids) {
 
-        #log new OPAC news deletion
+        #Log news deletion
         if (C4::Context->preference("NewsLog")) {
             foreach my $newsid ( split(/,/, $ids )) {
                 my $n = Koha::News->find( $newsid );
-                logaction('OPACNEWS', 'DELETE', undef, $n->unblessed->{lang} . ' | ' . $n->unblessed->{content} );
+                logaction('NEWS', 'DELETE', undef, $n->unblessed->{lang} . ' | ' . $n->unblessed->{content} );
             }
         }
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
index 1878f6940c..3b0886d369 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
@@ -95,7 +95,7 @@
 [%        CASE 'SEARCHENGINE' %]Search engine
 
 [%        CASE 'NOTICES'      %]Notices[% UNLESS Koha.Preference('NoticesLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
-[%        CASE 'OPACNEWS'      %]OPAC news[% UNLESS Koha.Preference('NewsLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
+[%        CASE 'NEWS'      %]News[% UNLESS Koha.Preference('NewsLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
 [%        CASE %][% module | html %]
 [%    END %]
 [% END %]
@@ -201,7 +201,7 @@
                                         [% ELSE %]
                                             <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label>
                                         [% END %]
-                                        [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'CLAIMS' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES', 'OPACNEWS' ] %]
+                                        [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'CLAIMS' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES', 'NEWS' ] %]
                                             [% IF modules.grep(modx).size %]
                                                 <label for="module[% modx | html %]" class="viewlog"><input type="checkbox" id="module[% modx | html %]" name="modules" value="[% modx | html %]" checked="checked"> [% PROCESS translate_log_module module=modx %]</label>
                                             [% ELSE %]
-- 
2.11.0